Commit Graph

58089 Commits

Author SHA1 Message Date
Julian Eisel
974ffaa39d Get workspace mode from the workspace view-layer
While this probably isn't the final solution we'll go with, it's nicer
as current one, which was basically broken. So consider this as
temporary solution.

It also allows testing how changing workspace changes mode & active
object, but only by having the workspaces use different view-layers.

Decided to remove WorkSpace.mode for now. If we need to bring it back,
we'll have to version patch it anyway.
2017-11-25 03:42:49 +01:00
Clément Foucault
7cbc7dd904 Eevee: SSS: Add separated Albedo option.
This option prevent from automatically blurring the albedo color applied to the SSS.

While this is great for preserving details it can bleed more light onto the nearby objects since the blurring will be done on pure "white" irradiance.
This issue is to be tackled in a separate commit.
2017-11-24 22:29:28 +01:00
Clément Foucault
8d4aa6bf44 GPUFramebuffer: Bump the framebuffer attachement limit to 5 color textures 2017-11-24 22:29:28 +01:00
Sergey Sharybin
8a1a053250 Depsgraph: Tag background scene for base flags update
When setting background object, it might pull new objects in and those objects
will not have proper flags unless on_visible_update() was called afterwards.
2017-11-24 16:55:33 +01:00
Sergey Sharybin
6130524d8c Revert "Depsgraph: Remove legacy re-scheduling code"
This reverts commit 90ff88646d.

Can not do this yet, if object is not part of graph yet it will not have entry
taq. Need some more generic solution here.
2017-11-24 16:44:54 +01:00
Sergey Sharybin
d211c36c83 Depsgraph: Allow tagging whole scene for base flags flush 2017-11-24 16:34:06 +01:00
Sergey Sharybin
20c8c9a3c7 Depsgraph: make it more obvious who's view layer is being updated 2017-11-24 16:33:21 +01:00
Sergey Sharybin
a1500fe865 Depsgraph: Do log from newly base flag flush function 2017-11-24 16:07:38 +01:00
Sergey Sharybin
90ff88646d Depsgraph: Remove legacy re-scheduling code 2017-11-24 15:46:25 +01:00
Sergey Sharybin
3023eb384a Depsgraph: Fix crash when deleting object which is linked both directly and indirectly 2017-11-24 15:46:25 +01:00
Sergey Sharybin
71febcbae0 Depsgraph: Make code a bit more robust against tagging indirectly linked objects 2017-11-24 15:46:25 +01:00
Sergey Sharybin
a365f1dd65 Depsgraph: Re-schedule pending tags after relations update
It is possible to have situation when we need to both update relations and do
some updates on random IDs. This was only done before for objects using their
recalc field. This means, every update tag which did not fit into there would
have been lost after updating relations.

Now we do some smarter re-scheduling of operations after relations are updated.
2017-11-24 15:46:25 +01:00
Sergey Sharybin
dde05cbcc2 Depsgraph: Directly linked objects should be priority for base flags over set scenes 2017-11-24 15:46:25 +01:00
Sergey Sharybin
ad288c9c34 Depsgraph: Fix race condition when object is coming from both scene and set 2017-11-24 15:46:25 +01:00
Sergey Sharybin
33b8a3f9e8 Depsgraph: Pass base in relations builder 2017-11-24 15:46:25 +01:00
Sergey Sharybin
272da2790b Depsgraph: Correct wrong base_flags for objects coming from set scene 2017-11-24 15:46:25 +01:00
Sergey Sharybin
81324dbfbf Depsgraph: Use proper link flag for indirectly linked parent object 2017-11-24 15:46:25 +01:00
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