Sergey Sharybin [Fri, 10 Feb 2017 13:52:54 +0000 (14:52 +0100)]
CTests: Initial work to cover Cycles nodes with OpenGL tests
Works similar to regular Cycles tests, just does OpenGL render to
get output image.
Seems to work fine with the only funny effect: Blender window will
pop up for each of the tests. This is current limitation of our
OpenGL context. Might be changed in the future.
Sergey Sharybin [Fri, 10 Feb 2017 13:08:12 +0000 (14:08 +0100)]
Cleanup: Trailing whitespace
Sergey Sharybin [Fri, 10 Feb 2017 12:33:02 +0000 (13:33 +0100)]
Cycles: Cleanup, move EdgeMap to blender_util
it's better place for such an utility structure. Still not fully ideal tho.
Sergey Sharybin [Fri, 10 Feb 2017 12:31:59 +0000 (13:31 +0100)]
Cycles: Make an utility class for edge map
Simplifies some logic.
Sergey Sharybin [Fri, 10 Feb 2017 12:23:40 +0000 (13:23 +0100)]
Cycles: Fix pointiness attribute giving wrong results with autosplit
Basically made the algorithm to handle vertices with the same coordinate
as a single vertex.
Sergey Sharybin [Fri, 10 Feb 2017 09:10:06 +0000 (10:10 +0100)]
Cycles: Cleanup: Use less indentation by inverting condition
Sergey Sharybin [Fri, 10 Feb 2017 09:06:58 +0000 (10:06 +0100)]
Cycles: Calculate all vertex attribute after faces generation
This way the calculation is not spread over multiple places.
Sergey Sharybin [Fri, 10 Feb 2017 09:05:41 +0000 (10:05 +0100)]
Cycles: Cleanup: use vector instead of bare malloc
This way memory is more "manageable" and easier to follow.
Sybren A. Stüvel [Fri, 10 Feb 2017 10:52:14 +0000 (11:52 +0100)]
Alembic: fixed mistake in bounding box computation
By performing the Z-up to Y-up conversion, the change in sign of the
Z-coordinate swaps "minimum" and "maximum".
Aaron Carlisle [Thu, 9 Feb 2017 21:25:04 +0000 (16:25 -0500)]
Do not overide text
Aaron Carlisle [Thu, 9 Feb 2017 21:18:33 +0000 (16:18 -0500)]
Fix T50629 -- Add remove doubles to the cleanup menu
Also move it up in the verticies menu
Aaron Carlisle [Thu, 9 Feb 2017 14:26:12 +0000 (09:26 -0500)]
Cleanup: Remove commented code
Code has been commented from before 2010 and relates to old Background image code.
Joshua Leung [Thu, 9 Feb 2017 06:08:58 +0000 (19:08 +1300)]
Use a smaller cross icon for clearing search box contents
Joshua Leung [Thu, 9 Feb 2017 05:59:51 +0000 (18:59 +1300)]
More tweaks to Normalisation options in Graph Editor
* Added a new dedicated icon for normalize
* Only use an icon for "Auto"
Joshua Leung [Thu, 9 Feb 2017 04:04:21 +0000 (17:04 +1300)]
Graph Editor: Replace Normalise/Auto checkboxes with toggle buttons
These take less space, fit in better with rest of the UI, and make their relationship clearer
Joshua Leung [Sat, 28 Jan 2017 11:05:41 +0000 (00:05 +1300)]
Fix: GPencil delete operators did not respect color locking
Sergey Sharybin [Mon, 30 Jan 2017 13:40:37 +0000 (14:40 +0100)]
Cycles: Fix regression with transparent shadows in volume
Sergey Sharybin [Mon, 30 Jan 2017 13:11:58 +0000 (14:11 +0100)]
Cycles: Solve speed regression by casting opaque ray first
Sergey Sharybin [Mon, 30 Jan 2017 11:33:58 +0000 (12:33 +0100)]
Cycles: Fix compilation error on OpenCL
Sergey Sharybin [Mon, 30 Jan 2017 11:08:20 +0000 (12:08 +0100)]
Cycles: Split shadow functions to avoid some duplicated calculations
Sergey Sharybin [Wed, 21 Sep 2016 15:46:25 +0000 (17:46 +0200)]
Cycles: Store shadow intersections in the kernel globals
Seems CUDA failed to de-duplicate the array across multiple inlined
versions of the shadow_blocked(). Helped it a bit with that now.
Gives about 100MB memory improvement on a scenes after previous
commit and brings up memory "regression" to only 100MB comparing to
the master branch now.
Sergey Sharybin [Wed, 8 Feb 2017 12:05:05 +0000 (13:05 +0100)]
Cycles: Speedup transparent shadows on CUDA
This commit enables record-all behavior of transparent shadows
rays.
Render times difference goes as following:
GTX 1080 render time
BMW -0.5%
Fishy Cat -0.0%
Pabellon Barcelona -11.6%
Classroom +1.2%
Koro -58.6%
Kernel will now use some extra VRAM memory to store the intersection
array (200MB on my configuration). This we can optimize out with some
further commits.
Sergey Sharybin [Wed, 21 Sep 2016 15:34:15 +0000 (17:34 +0200)]
Cycles: Implement record-all transparent shadow function for GPU
The idea is to record all possible transparent intersections when
shooting transparent ray on GPU (similar to what we were doing on
CPU already).
This avoids need of doing whole ray-to-scene intersections queries
for each intersection and speeds up a lot cases like transparent
hair in the cost of extra memory.
This commit is a base ground for now and this feature is kept
disabled for until some further tweaks.
Sergey Sharybin [Wed, 21 Sep 2016 10:53:38 +0000 (12:53 +0200)]
Cycles: Use an utility function to sort intersections array
Sergey Sharybin [Wed, 21 Sep 2016 10:39:14 +0000 (12:39 +0200)]
Cycles: Make GPU version of shadow_blocked() closer to CPU
Now we break the traversal cycle and then perform volume attenuation
and check with zero throughput. Not sure it makes any measurable sense
at this moment, but in the future it might help de-duplicating some
extra logic here.
Sergey Sharybin [Wed, 21 Sep 2016 10:30:52 +0000 (12:30 +0200)]
Cycles: De-duplicate transparent shadows attenuation
Fair amount of code was duplicated for CPU and GPU, now we are
using inlined function to avoid such duplication.
Sybren A. Stüvel [Wed, 8 Feb 2017 10:47:16 +0000 (11:47 +0100)]
Fix T49249: Alembic export with multiple hair systems crash blender
Removed unnecessary call to DM_update_tessface_data(). This call is
already performed by DM_ensure_tessface(dm). The call being performed
twice caused a failing BLI_assert().
Reviewed by: Kévin Dietrich
Sybren A. Stüvel [Wed, 8 Feb 2017 10:50:21 +0000 (11:50 +0100)]
Alembic export: avoid infinite loops trying to find parent objects.
Also added some assertions for debugging purposes
Reviewed by: Kévin Dietrich
Sybren A. Stüvel [Wed, 8 Feb 2017 10:48:59 +0000 (11:48 +0100)]
Alembic export: only create transform writer if the object should be exported
Reviewed by: Kévin Dietrich
Sybren A. Stüvel [Tue, 7 Feb 2017 13:53:09 +0000 (14:53 +0100)]
Alembic: #undef'ed the correct macro
TEST_RET is not defined anywhere in Blender's sources, and LAYER_CMP
is no longer used after this function ends.
Sybren A. Stüvel [Tue, 7 Feb 2017 11:20:42 +0000 (12:20 +0100)]
Alembic: Use getXForm() in check, because it's used in rest of the function too
This makes the code within the function consistent.
Sybren A. Stüvel [Fri, 3 Feb 2017 14:54:59 +0000 (15:54 +0100)]
Alembic: Renamed copy_zup_yup to copy_yup_from_zup (and same for zup_from_yup)
With the new names the arguments (yup, zup) are in the same order as
they appear in the function name. The old names used copy_src_dst(dst,
src), which I found very confusing. Furthermore, now it is clear from
where to where the copy is made.
This makes the function names a little bit longer, though. If that is
a real issue, we can just name them zup_from_yup(zup, yup).
Reviewed by: Kévin Dietrich
Sergey Sharybin [Tue, 7 Feb 2017 16:49:35 +0000 (17:49 +0100)]
Cleanup: Use const qualifier in some of color management code
Sergey Sharybin [Tue, 7 Feb 2017 16:45:28 +0000 (17:45 +0100)]
Sequencer: Some extra speedup in color space conversion
Use the new utility from coloranagement which multi-threads byte to
float conversion.
Gives extra 10% speedup from quick tests.
Sergey Sharybin [Tue, 7 Feb 2017 16:45:02 +0000 (17:45 +0100)]
Color management: Add utility function to convert byte to float with processor applied
Sergey Sharybin [Tue, 7 Feb 2017 16:30:51 +0000 (17:30 +0100)]
Sequencer: Speedup conversion to sequencer space
Speedup is mainly gained by multi-threading. Gives about 3x
fps gain on an edit shot file.
There is still some room for improvements, will happen in one
of the upcoming commits.
Sergey Sharybin [Tue, 7 Feb 2017 15:59:17 +0000 (16:59 +0100)]
Color management: Implement threaded byte buffer conversion
The title says it all actually: now we can convert byte buffer
directly, without need of temporary float buffer.
Germano Cavalcante [Tue, 7 Feb 2017 14:03:10 +0000 (11:03 -0300)]
Param `is_cached` not being used in` bvhtree_from_mesh_edges_setup_data`
This could cause bugs in the memory release
Sergey Sharybin [Tue, 7 Feb 2017 13:21:29 +0000 (14:21 +0100)]
Fix missing hair after rendering with different viewport/render settings
Derived mesh for particles did not include tessellated faces when it
was expected to. Now added explicit function to copy CDDM with tess
faces without need to re-tessellate the result.
Sergey Sharybin [Tue, 7 Feb 2017 12:05:19 +0000 (13:05 +0100)]
Fix T49253: Cycles blackbody is wrong on AVX2 CPU on Windows
Seems to be bug in optimizer, but managed to reshuffle in a way
which should also give some speedup.
Bastien Montagne [Tue, 7 Feb 2017 09:14:46 +0000 (10:14 +0100)]
PIL_time_utildefines: also show total time in TIMEIT_AVERAGED.
Bastien Montagne [Mon, 6 Feb 2017 19:58:18 +0000 (20:58 +0100)]
Fix (unreported) Object previews being written even for skipped objects.
Bastien Montagne [Mon, 6 Feb 2017 19:42:00 +0000 (20:42 +0100)]
Cleanup writefile code a bit.
Modernize some of it a bit, saves quite some lines of blabla (using
shile instead of for loops... tsssts...).
Jorge Bernal [Mon, 6 Feb 2017 18:29:42 +0000 (19:29 +0100)]
CMake: Remove MOTO library dependency when it is not needed
It is not necessary to add MOTO library dependency when we use
WITH_IK_SOLVER (now it uses Eigen) or we use WITH_MOD_BOOLEAN (it was
used by bsp intern library some time ago but it is not present in the
code anymore).
Reviewers: mont29, sergey
Subscribers: mont29, sergey
Differential Revision: https://developer.blender.org/D2477
Germano Cavalcante [Mon, 6 Feb 2017 17:59:31 +0000 (14:59 -0300)]
Specify the correct size of the BVHTree of edges
~edge_num~ edges_num_active
Not always all the edges enter in the build
Germano Cavalcante [Mon, 6 Feb 2017 17:11:06 +0000 (14:11 -0300)]
Standardization and style for BKE_bvhutils
Add `bvhtree_from_mesh_edges_ex` and callbacks to nearest_to_ray (Similar to the other functions of this code)
Bastien Montagne [Mon, 6 Feb 2017 16:42:30 +0000 (17:42 +0100)]
Fix 'public' global 'g_atexit' var in Blender.
No reason to not make this private to this file, and it gave conflict
when using bpy as module and loading it in a GLib application (which
also has a g_atexit var).
Sergey Sharybin [Mon, 6 Feb 2017 14:29:13 +0000 (15:29 +0100)]
Fix compilation error after recent change
Sergey Sharybin [Mon, 6 Feb 2017 14:04:13 +0000 (15:04 +0100)]
Add shortcuts for unsigned int, short, long and char
Feel free to use those in the new code.
And stay away from simple "unsigned".
Sergey Sharybin [Mon, 6 Feb 2017 10:12:35 +0000 (11:12 +0100)]
Use hash instead of linear lookup in armature deform
This avoids calling linear lookup 100s of time when dealing with
real-life character.
Still some tweaks possible.
Sergey Sharybin [Mon, 6 Feb 2017 13:21:29 +0000 (14:21 +0100)]
Multi-thread displace modifier
The title says it all actually. Use BLI task to loop over vertices
and distort their locations. Gives 2x FPS increase in a file with
just time-dependent displace modifier on my desktop.
Sergey Sharybin [Mon, 6 Feb 2017 11:33:37 +0000 (12:33 +0100)]
Displace modifier: Use special version of texture sampling
This version will give less spin locks and now well-tested by render engines.
This should reduce amount of threading overhead when having multiple objects
with displace modifier enabled.
In the future this will also help us threading the modifier.
There are more modifiers which could benefit from this, but let's first
investigate the new behavior with one of them.
Sergey Sharybin [Mon, 6 Feb 2017 11:23:03 +0000 (12:23 +0100)]
Add special texture sampling function which takes image pool argument
Using image pool will reduce number of thread locks when acquiring image.
Useful when it's needed to sample texture fewzillion times a second.
Sergey Sharybin [Mon, 6 Feb 2017 10:18:20 +0000 (11:18 +0100)]
Fix memory leak when building without audaspace
Phil Christensen [Mon, 6 Feb 2017 09:44:25 +0000 (10:44 +0100)]
C++ conformance fixes (MSVC /permissive-)
We (the Microsoft C++ team) use the Blender project as part of our "Real world code" tests.
I noticed a place in WIN32 specific code (dvpapi.cpp:85) where a string literal is losing
its const-ness when being passed to BLI_dynlib_open(). This is not permitted when using the
/permissive- conformance compiler switch (see our blog
https://blogs.msdn.microsoft.com/vcblog/2016/11/16/permissive-switch/)
My suggested fix is to add const and propagate it where needed. Another possible fix would be
to explicitly cast away the const.
Reviewers: mont29, sergey, LazyDodo
Subscribers: Blendify, sergey, mont29, LazyDodo
Tags: #platform:_windows
Differential Revision: https://developer.blender.org/D2495
Germano Cavalcante [Mon, 6 Feb 2017 04:01:39 +0000 (01:01 -0300)]
fix T50602: Avoid crash when executing `transform_snap_context_project_view3d_mixed` with `dist_px` NULL
Germano Cavalcante [Sat, 4 Feb 2017 22:06:41 +0000 (19:06 -0300)]
Cleaning of the last commit: lack of attention with the debug of time X(
This was a stupid mistake
Germano Cavalcante [Sat, 4 Feb 2017 22:01:29 +0000 (19:01 -0300)]
Optimize BVHTree creation of vertices that have BLI_bitmap test
Instead of reference the vertex first and test the bitmap afterwards. Test the bitmap first and reference the vertex after.
In a mesh with 31146 vertices and the entire bitmap disabled, the loop time is 243% faster
With all bitmap enabled, the time becomes 463473% faster!!!
One possible reason for this huge difference in peformance is that maybe the compiler is not putting the function "BM_vert_at_index" inline (I dont know if buildbot do this, but it's good to investigate).
Germano Cavalcante [Sat, 4 Feb 2017 21:17:15 +0000 (18:17 -0300)]
fix T50592: Scene.raycast not working
Ray_start and ray_normal values were being ignored
Bastien Montagne [Sat, 4 Feb 2017 20:51:27 +0000 (21:51 +0100)]
Fix (unreported) crash in new snap code.
Looks like `object_map` and `mem_arena` may be NULL sometimes...
Also, cleaned up function pointers declaration of Nearest2dUserData,
those were warning out in gcc. Please, *always* use typdef defined
prototypes for function pointers, it is sooooo much cleaner and clearer
that way. And easy to convert from compatible functions too.
Bastien Montagne [Sat, 4 Feb 2017 20:29:51 +0000 (21:29 +0100)]
Fix T50590: BI lamp doesn't hold a texture in this case.
BKE_lamp_free was somehow missing the refactor of datablocks handling
(which, among other things, completely separated ID refcounting and
linking management from ID freeing itself).
Either forgot during development, or lost during merge...
Germano Cavalcante [Fri, 3 Feb 2017 23:08:57 +0000 (20:08 -0300)]
Snap System: Use callbaks to differentiate how referenced vertives of DerivedMeshs and Bmeshs
Before it was informed the type of object in the `userdata`, and a same function ran between the types to obtain the coordinates of the vertices
Germano Cavalcante [Fri, 3 Feb 2017 22:03:31 +0000 (19:03 -0300)]
Remove flag: `SNAP_OBJECT_USE_CACHE` from snap_context
Since the cache is created in one way or another, this flag is not really making a difference
More details here: D2496
Germano Cavalcante [Fri, 3 Feb 2017 16:15:44 +0000 (13:15 -0300)]
fix T46892: snap to closest point now works with Individual Origins
The code looks for the closest element between its centers. In the case of islands, the center of each vertex is the center of the island.
The solution here is to skip the search for islands when the operation is translation
Germano Cavalcante [Fri, 3 Feb 2017 15:57:02 +0000 (12:57 -0300)]
Forgotten in committee
ddf99214dc06
In obect mode, the rotation matrix need to be restored to the initial value if a snap point is not found
Sergey Sharybin [Fri, 3 Feb 2017 15:09:53 +0000 (16:09 +0100)]
Buildbot: Re-enable cuda support for OSX
Bastien Montagne [Fri, 3 Feb 2017 15:10:00 +0000 (16:10 +0100)]
Fix T50125: Shortcut keys missing in menus for Clear Location, Rotation, and Scale.
Menu entries and shortcuts did not have exact same behavior, now they do
(using shortcuts' behavior).
Bastien Montagne [Fri, 3 Feb 2017 14:47:44 +0000 (15:47 +0100)]
Fix T49860: Copying vgroups between objects sharing the same obdata was not possible.
Pretty straight forward actually, just do not bother about obdata part
of vgroups in that case, only copy object part of it.
And let's curse once again those stuff spread accross several types of
data-blocks...
Sergey Sharybin [Fri, 3 Feb 2017 13:05:59 +0000 (14:05 +0100)]
Depsgraph: Add some extra debug prints on eval
Sergey Sharybin [Fri, 3 Feb 2017 11:03:59 +0000 (12:03 +0100)]
Tests: Use proper order for EXPECT_EQ()
Sergey Sharybin [Fri, 3 Feb 2017 10:52:47 +0000 (11:52 +0100)]
Tests: Use EXPECT_FALSE() instead of EXPECT_EQ(foo, false)
Sergey Sharybin [Fri, 3 Feb 2017 10:51:01 +0000 (11:51 +0100)]
Tests: Use EXPECT_TRUE() instead of EXPECT_EQ(foo, true)
Sergey Sharybin [Fri, 3 Feb 2017 10:35:34 +0000 (11:35 +0100)]
Cycles: Cleanup, order of arguments to EXPECT_EQ
The order was wrong from the semantic point of view, caused
by some legacy workarounds in Libmv. Didn't realize it's was
not how things were expected to be used.
Sergey Sharybin [Fri, 3 Feb 2017 10:03:47 +0000 (11:03 +0100)]
Explode modifier: Don't tessellate DM if we are not going to apply modifier
Germano Cavalcante [Fri, 3 Feb 2017 05:27:57 +0000 (02:27 -0300)]
fix T49494: snap_align_rotation should use a local pivot to make the transformation
The problem was simple, just transform the global coordinates of t->tsnap.snapTarget to local coordinates.
(Some comments were added to the code)
Bastien Montagne [Thu, 2 Feb 2017 20:37:53 +0000 (21:37 +0100)]
Fix T50084: Adding torus re-orders UV layers.
Issue was indeed in join operation, mesh in which we join all others
could be re-added to final data after others, leading to undesired
re-ordering of CD layers, and existing vertices etc. being shifted away
from their original indices, etc.
All kind of more or less bad and undesired changes, fixed by always
re-inserting destination mesh first.
Also cleaned up a bit that code, it was doing some rather
non-recommanded things (like allocating zero-sized mem, doing own
coocking to remove a data-block from main, etc.).
Sybren A. Stüvel [Thu, 2 Feb 2017 15:04:49 +0000 (16:04 +0100)]
install_deps.sh: don't use backticks
The script complained that it could not find the executable "--build-all".
Bastien Montagne [Thu, 2 Feb 2017 16:00:52 +0000 (17:00 +0100)]
Fix T50524: Basis shapekey editing while rendering bug.
Root of the issue was BM_mesh_bm_to_me() breaking application of basis
offset to 'child' shapekeys, when called more than once from same BMesh.
raa [Thu, 2 Feb 2017 14:30:50 +0000 (17:30 +0300)]
Fix T50497: prop_search not correctly drew in UI (D2473)
Sergey Sharybin [Thu, 2 Feb 2017 13:32:05 +0000 (14:32 +0100)]
Fix T50535: Cycles render segfault when Explode modifier before hair particle modifier + UV material
Tricky issue caused by CDDM_copy() coying MFACE array but not MTFACE which
confused logic later on.
Now we don't copy ANY tessellation unless it is requested to.
Thanks Bastien for help and review!
Aaron Carlisle [Thu, 2 Feb 2017 04:46:53 +0000 (23:46 -0500)]
Revert the change of a default in a recent commit
This was my own mistake
Michael Stahre [Thu, 2 Feb 2017 02:59:11 +0000 (03:59 +0100)]
Fix incorrect spot lamp blend in python GPU uniform export.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D2378
Michael Stahre [Thu, 2 Feb 2017 02:59:21 +0000 (03:59 +0100)]
Fix missing uniform type for python GPU uniform export.
Reviewed By: brecht
Differential Revision: https://developer.blender.org/D2379
Aaron [Wed, 1 Feb 2017 19:56:11 +0000 (14:56 -0500)]
UI: Add missing colon
Bastien Montagne [Wed, 1 Feb 2017 11:52:26 +0000 (12:52 +0100)]
Fix T50570: pressing pgup or pgdn in any scrollable area irreversably alters scrolling speed.
'page' prop of scroll up/down operators would get stuck once set once by
pageup/down keys... Now only take this prop into account if explicitely
set, not when its value is inherited from previous run.
Sergey Sharybin [Wed, 1 Feb 2017 09:13:40 +0000 (10:13 +0100)]
Cycles tests: Allow python auto-exec
Lukas Stockner [Wed, 1 Feb 2017 04:43:17 +0000 (05:43 +0100)]
Cycles: Fix rng_state initialization when using resumable rendering
Germano Cavalcante [Wed, 1 Feb 2017 00:43:44 +0000 (21:43 -0300)]
Snap System: BVH: Ignore calculations, in parent nodes, used only in perspective view
Strangely this change does not affect the performance very much.
Suzanne subdividide 6x (ortho view):
Before:0.
00013983
After :0.
00013920
But it makes it easier to read the code
Germano Cavalcante [Tue, 31 Jan 2017 20:10:34 +0000 (17:10 -0300)]
Snap System: Invert the test order of the elements to snap (useful for ruler)
When the function that tests snap on multiple elements starts from the face and ends at the vertex, the transition between elements becomes much smoother.
Sergey Sharybin [Tue, 31 Jan 2017 11:17:42 +0000 (12:17 +0100)]
Fix T50331: New Dependency Graph - "frame" python driver expression not working
Sergey Sharybin [Tue, 31 Jan 2017 11:08:19 +0000 (12:08 +0100)]
Cycles: Fix spelling in comment
Sergey Sharybin [Tue, 31 Jan 2017 10:55:29 +0000 (11:55 +0100)]
Fix variable shadow and avoid calculating same value twice
Dalai Felinto [Tue, 31 Jan 2017 10:00:18 +0000 (11:00 +0100)]
Silence unused var warnings after rBac58a7fa
Bastien Montagne [Tue, 31 Jan 2017 09:41:25 +0000 (10:41 +0100)]
Cleanup: use 'cb_flag', not 'cd_flag' for library_query callbacks.
`cd_flag` tends to be used for CustomData flags in mesh area, while for
library_query those are rather callback flags...
Bastien Montagne [Tue, 31 Jan 2017 08:47:59 +0000 (09:47 +0100)]
Cleanup: Rename callback flags from library_query to `IDWALK_CB_...`
Better to have clear way to tell whether flag is parameter for
BKE_library_foreach_ID_link(), parameter for its callback function, or
return value from this callback function.
Kévin Dietrich [Tue, 31 Jan 2017 05:59:11 +0000 (06:59 +0100)]
Fix compilation error: too few arguments to function call.
D2492 by @tomjpsun.
Germano Cavalcante [Tue, 31 Jan 2017 02:49:09 +0000 (23:49 -0300)]
Fix bug not reported: Ruler/Protractor: Snap to vertices and edges was not considering the depth variation
Taking advantage of the area, the depth is decreased 0.01 BU to each loop to give priority to elements in order: Vertice > Edge > Face. This increases the threshold and improves the snap to multiple elements
Germano Cavalcante [Tue, 31 Jan 2017 01:49:44 +0000 (22:49 -0300)]
Snap System: Return depth by snapping to edges and vertices, because the Ruler only works right this way
The Ruler snaps to the element with the lowest depth.
Germano Cavalcante [Tue, 31 Jan 2017 01:27:38 +0000 (22:27 -0300)]
Use the same solution to test the pixel distance to the AABB, with BoundBox
The previous solution took arbitrary values to determine if the mouse was near or not to the Bound Box (it simply scaled the Bound Box).
Now the same function that detected the distance from the BVHTree nodes to the mouse is used in the Bound Box
Tamito Kajiyama [Tue, 31 Jan 2017 00:04:05 +0000 (09:04 +0900)]
Freestyle: Use of the Fill Range by Selection operator in the mesh edit mode.
This revision extends the functionality of the "Fill Range by Selection" button in
the "Distance from Camera/Object" modifiers so that only selected mesh vertices
in the edit mode are taken into account (instead of considering all vertices when
in the object mode) to compute the min & max distances from the reference.
This will give users much finer control on the range values.