Commit Graph

75472 Commits

Author SHA1 Message Date
Sergey Sharybin
56367cfeb3 Merge branch 'master' into blender2.8 2017-11-24 15:46:10 +01:00
Sergey Sharybin
1caa267ee6 Depsgraph: Cleanup, indentation 2017-11-24 15:45:41 +01:00
Sergey Sharybin
c546fb9e85 Merge branch 'master' into blender2.8 2017-11-24 15:40:53 +01:00
Sergey Sharybin
5f7981243e Depsgraph: Allow finding operations after construction is done 2017-11-24 15:38:20 +01:00
Sergey Sharybin
a8b97b2e41 Depsgraph: Deduplicate operation node finding logic 2017-11-24 15:35:42 +01:00
Sergey Sharybin
d232363290 Depsgraph: Use proper return type for find_node method 2017-11-24 15:34:53 +01:00
Sergey Sharybin
d80c1e1e11 Depsgraph: Use get_ prefix for function which expect operation to exists 2017-11-24 15:32:29 +01:00
Sergey Sharybin
d8f33fc818 Depsgraph: Make has_ prefixed function to return boolean 2017-11-24 15:26:54 +01:00
Sergey Sharybin
93e8a045df Depsgraph: Introduce explicit method which finds operation or returns NULL 2017-11-24 15:24:33 +01:00
Sergey Sharybin
68654c0be5 Depsgraph: Make more clear what find_operation() is doing for component 2017-11-24 15:21:50 +01:00
Dalai Felinto
4493d0d085 Object RNA: expose base_flag settings:
object.is_from_set
object.is_from_duplicator

We need them for the unittests, and users can benefit from it as well.
Note, this only makes sense when reading objects from depsgraph:

`bpy.context.depsgraph.objects`
2017-11-24 11:41:49 -02:00
Sergey Sharybin
121b44698a Depsgraph: Re-build relations when changing set scene
Set scene is a part of dependency graph, so need to tag relations for update
after changing set scene/
2017-11-24 13:02:19 +01:00
Bastien Montagne
6b4a243377 Merge branch 'master' into blender2.8 2017-11-24 10:58:28 +01:00
Campbell Barton
543945b9e5 Correct sensor fit use 2017-11-24 21:01:04 +11:00
Bastien Montagne
8db63c6a1c Cleanup leftover timing debug prints from own recent commits.
Sorry about that...
2017-11-24 10:43:29 +01:00
Sergey Sharybin
87c821ff26 Depsgraph: Flush flags from base to object as an evaluation step
Previously it was done during depsgraph iteration, which is not good at all,
since after evaluation nobody should really modify how object was evaluated.
2017-11-24 10:19:48 +01:00
Sergey Sharybin
93f6a9d652 Depsgraph: Add special cases to deal with multiple objects selection update
The idea then is to avoid doing depsgraph tag for each of the object which
selection is changed (which could be tricky to do anyway due to lots of areas
of selection code where this could happen), and simply tag scene's with
selection update tag.

This will involve synchronization of flags from base to objects, which is
rather cheap anyway.
2017-11-24 10:19:48 +01:00
Sergey Sharybin
d2679b3e42 Depsgraph: Add base flag flush operation definition 2017-11-24 10:19:48 +01:00
Sergey Sharybin
1949ed558b Depsgraph: Pass base to build_object() 2017-11-24 10:19:48 +01:00
Sergey Sharybin
c1f690428c Depsgraph: Create CoW copy of scene early on
Originally this only needed for view collections, but it will be needed for
bases really soon as well.
2017-11-24 10:19:48 +01:00
Sergey Sharybin
a5d763a11e Depsgraph: Use depsgraph to handle edit mode selection
This is crucial bit since batch cache is stored in the evaluated object,
meaning we can't tag it's hatch cache dirty from the notifier system.
Not easily at least. Better to leave this job to depsgraph, it knows
all the copies of data.
2017-11-24 10:19:48 +01:00
Campbell Barton
0f5ef668da Manipulator: fix camera lens update glitch
Property range setup initially used values that can change.
2017-11-24 20:28:13 +11:00
Clément Foucault
cda22ce0e2 Eevee: Fix SSR adding too much light.
Basically the probes were rendered twice.
2017-11-24 06:37:37 +01:00
Clément Foucault
2302ba2245 Eevee: Refactor of lit_surface_frag.glsl
This cleanup removes the need of gigantic code duplication for each closure.

This also make some preformance improvement since it removes some branches and duplicated loops.

It also fix some mismatch (between cycles and eevee) with the principled shader.
2017-11-24 06:37:37 +01:00
Clément Foucault
16a2802149 Eevee: SSS: Principled Shader: Add a workaround the lack of scale input
This is a hack to make the user control the SSS radius even though the profile is baked with the default radius values.

This is completly against UI principles since you cannot edit the profile radiuses while there is something plugged into the radius socket.
Better solution will be to either have a dedicated node value for RGB radiuses and a SSS scale socket only for eevee.
2017-11-24 06:37:37 +01:00
Campbell Barton
f3b384862d Merge branch 'master' into blender2.8 2017-11-24 14:30:36 +11:00
Campbell Barton
c62e3a05b0 Cleanup: -Wnonnull-compare GCC warning 2017-11-24 14:29:17 +11:00
Bastien Montagne
b63442e0b6 Minor cleanup for own recent commits. 2017-11-23 22:43:11 +01:00
Bastien Montagne
a786baa193 Merge branch 'master' into blender2.8 2017-11-23 21:36:27 +01:00
Bastien Montagne
43ddf0e9a7 Getting rid of OMP: first usage of new parallel BMesh items iteration instead.
`BM_mesh_normals_update` was converted from OMP to new parallel iterator code,
basic test with heavily subdivided cube (24.5k faces) gives:
    - old OMP code: average 10ms per run.
    - new BLI_task code: average 6ms per run.

So new code seems to be easily 40% quicker, in addition to getting rid of OMP. ;)

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D2930
2017-11-23 21:21:32 +01:00
Bastien Montagne
bc3f0cfd14 BMesh: add limited support for parallelization over some basic iterators.
This merely uses new memloop/task looper over vertex/edge/face mempools.

Quite obviously, only BM_VERTS/EDGES/FACES_OF_MESH iterators are
supported.
2017-11-23 21:19:54 +01:00
Bastien Montagne
efb86b712d Add a new parallel looper for MemPool items to BLI_task.
It merely uses the new thread-safe iterators system of mempool, quite
straight forward.

Note that to avoid possible confusion with two void pointers as
parameters of the callback, a dummy opaque struct pointer is used
instead for the second parameter (pointer generated by iteration over
mempool), callback functions must explicitely convert it to expected
real type.

Also added a basic gtest for this new feature.
2017-11-23 21:14:43 +01:00
Bastien Montagne
b84e6dfee4 Add ability to use more than one mempool iterator simultaneously.
This will allow threaded tasks to 'consume' all mempool items in
parallel tasks, each one working on a whole chunk at once (to reduce
concurrency managing overhead).
2017-11-23 21:12:00 +01:00
Bastien Montagne
c947788830 Merge branch 'master' into blender2.8 2017-11-23 20:34:03 +01:00
Bastien Montagne
d423e66d34 Add non-gcc variant of static assert macro.
Adapted from http://www.pixelbeat.org/programming/gcc/static_assert.html.

Note that this macro just discards error message, so error when building
is much less nice than with gcc's _Static_assert... But error log will
point to right place in code, so should still be OK.
2017-11-23 20:25:55 +01:00
Brecht Van Lommel
5e13097dc3 Fix T53145: bevel tool fails when used a second time.
Pixel size was not initial early enough. For first time this was not a problem
because the bevel amount starts at 0 then, and after the mouse moves the pixel
size is initialized. For the second time the bevel amount starts at a non-zero
value, and it failed then.
2017-11-23 20:17:31 +01:00
Brecht Van Lommel
4f8bffa7bf Merge branch 'master' into blender2.8 2017-11-23 19:16:11 +01:00
Brecht Van Lommel
56da112ae0 Fix T53360: crash with GLSL bump mapping and missing group output node. 2017-11-23 18:12:32 +01:00
Dalai Felinto
b79b8478ee Cleanup: Rename ViewLayer *sl > ViewLayer *view_layer 2017-11-23 14:58:01 -02:00
Brecht Van Lommel
f218e6d4da Fix T53276: encoding output quality UI clarification. 2017-11-23 17:55:25 +01:00
Brecht Van Lommel
dd04f54e84 Fix inaccuracy when storing material ID pass in half float multilayer EXR.
These and other non-RGB passes should always be stored as full float, the
precision loss is too unpredictable.

Related to T53381, but that one is about file output nodes where we don't
know the type of data being saved currently.
2017-11-23 17:14:04 +01:00
Brecht Van Lommel
e50ed90e4d Fix T53348: Cycles difference between gradient texture on CPU and GPU. 2017-11-23 17:14:04 +01:00
Dalai Felinto
e314aa1e47 Fix specific 2.8 broken files
Short of checking for types (SceneLayer) this is the only reliable
way of getting all 2.80 files to date.
2017-11-23 13:33:58 -02:00
Bastien Montagne
5330e7fd29 Merge branch 'master' into blender2.8 2017-11-23 16:29:00 +01:00
Bastien Montagne
580b34e52b atomic_ops: add char versions of uint8_t atomic primitives. 2017-11-23 16:24:34 +01:00
Bastien Montagne
497e2b3dfa Cleanup: use signed atomic ops when needed. 2017-11-23 16:24:34 +01:00
Sergey Sharybin
35e8138c95 Merge branch 'master' into blender2.8 2017-11-23 15:26:53 +01:00
Sergey Sharybin
75a87abdc9 Depsgraph: Cleanup, deduplicate code around component registration 2017-11-23 15:23:19 +01:00
Sergey Sharybin
f7af770446 Depsgraph: Cleanup, don't use view layer name
Dependency graph is only built per-view-layer now, so no need to store names.
Will speed up operation lookup as well,.
2017-11-23 14:44:14 +01:00
Julian Eisel
641d870b37 Tag properties of transform operators as 'advanced'
Sets the 'advanced' tag for some properties of following transform operators:
* Create Orientation
* Translate
* Resize
* Skin Resize
* Trackball
* Rotate
* Tilt
* Bend
* Shear
* Push/Pull
* Shrink/Flatten
* To Sphere
* Edge Slide
* Vertex Slide
* Edge Crease
* Edge Bevel Weight
* Sequence Slide
* Transform
2017-11-23 14:21:40 +01:00