Commit Graph

736 Commits

Author SHA1 Message Date
Campbell Barton
be40389165 Merge branch 'master' into blender2.8 2018-01-03 23:44:47 +11:00
Joshua Leung
7e4568a939 Cleanup - Various style/typo fixes 2017-12-23 23:54:05 +13:00
Sergey Sharybin
d2ea9c2063 Fix typo in previous commit 2017-12-21 17:19:07 +01:00
Sergey Sharybin
a7efdc14a1 Merge branch 'master' into blender2.8 2017-12-21 17:17:27 +01:00
Sergey Sharybin
c66983c5c8 Depsgraph: Sort and clam number of statistics entries
Makes log easier to read.
2017-12-21 17:16:18 +01:00
Dalai Felinto
b89f2276e5 Implement duplicator viewport/render visibility options
This allows a duplicator (as known as dupli parent) to be in a visible
collection so its duplicated objects are visible, however while being
invisible for the final render.

An object that is a particle emitter is also considered a duplicator.

Many thanks for the reviewers for the extense feedback.

Reviewers: sergey, campbellbarton

Differential Revision: https://developer.blender.org/D2966
2017-12-21 13:43:24 -02:00
Sergey Sharybin
103dd66057 Merge branch 'master' into blender2.8 2017-12-21 16:36:02 +01:00
Sergey Sharybin
885bb5b137 Depsgraph: Bring timing statistics to the new dependency graph
This statistics is only collected when debug_value is different from 0.

Stored in depsgraph node itself, so we can always have access to average data
and other stats which requires persistent storage. This way we also don't waste
time trying to find stats from a separately stored hash map.
2017-12-21 16:33:22 +01:00
Sergey Sharybin
d988eae6f9 Depsgraph: Make it more clear that we dump relations into graphviz
We might implement other things to dump into graphviz, so better to
start having explicit names.
2017-12-21 16:33:22 +01:00
Sergey Sharybin
b7121639e9 Depsgraph: Simplify some functions in evaluaiton 2017-12-21 16:33:22 +01:00
Sergey Sharybin
f0a5dc63ff Depsgraph: Simplify evaluation function 2017-12-21 16:33:22 +01:00
Sergey Sharybin
b38c083259 Merge branch 'master' into blender2.8 2017-12-21 12:17:48 +01:00
Sergey Sharybin
41b29c69c0 Depsgraph: Fix mistake in previous commit 2017-12-21 12:16:12 +01:00
Sergey Sharybin
00062e08ee Merge branch 'master' into blender2.8 2017-12-21 12:00:06 +01:00
Sergey Sharybin
6e47680077 Depsgraph: Remove confusing declaration of node method
it is only to be implemented for operation node.
2017-12-21 11:58:48 +01:00
Sergey Sharybin
681a102800 Depsgraph: Remove one of temporary tags in the node
No real reason to have that, better to free up space for something much more
awesome!
2017-12-21 11:47:34 +01:00
Sergey Sharybin
5df4950073 Depsgraph: Cleanup, move implementation away from header 2017-12-21 11:35:10 +01:00
Sergey Sharybin
9f0d067c2e Merge branch 'master' into blender2.8 2017-12-21 11:17:34 +01:00
Sergey Sharybin
f6b2fbb029 Depsgraph: Remove evaluation priority completely 2017-12-21 11:15:21 +01:00
Sergey Sharybin
f906f5cc58 Depsgraph: Remove eval priority from debugger
This needs to be redone anyway, to correspond to possibly new priorities
calculated for evaluaiton.
2017-12-21 11:14:39 +01:00
Sergey Sharybin
0ed3a72012 Depsgraph: Remove unused component context functions 2017-12-21 10:37:00 +01:00
Sergey Sharybin
93b2871cf5 Depsgraph: Remove node class stored in both type info and node
This is something deliver form node type, there is no reason to try cache it
anywhere, especially since it's not used in any performance critical code.

Lighter weight dependency graph is what we want.
2017-12-20 17:54:52 +01:00
Sergey Sharybin
03a589125f Merge branch 'master' into blender2.8 2017-12-20 16:46:28 +01:00
Sergey Sharybin
e5b92cd63e Depsgraph: Remove unused incldues 2017-12-20 16:45:10 +01:00
Sergey Sharybin
a52452c043 Merge branch 'master' into blender2.8 2017-12-20 16:40:49 +01:00
Sergey Sharybin
3474db4b37 Depsgraph: Move ID node to own file 2017-12-20 16:35:48 +01:00
Sergey Sharybin
f87c157f22 Depsgraph: Move time source node to own file 2017-12-20 16:29:13 +01:00
Sergey Sharybin
b2ef042793 Depsgraph: Print some statistics about transitive reduction 2017-12-20 16:19:40 +01:00
Sergey Sharybin
f2aacfc943 Depsgraph: Make transitive reduction to work 2017-12-20 16:16:28 +01:00
Sergey Sharybin
5b1404f066 Depsgraph: Add utility function to unlink relation from graph 2017-12-20 16:15:55 +01:00
Sergey Sharybin
1e236deab3 Depsgraph: Remove unused priority calculator
While it sounds useful, in practice it was rather causing
extra overhead and was slowing things down.
2017-12-20 15:53:39 +01:00
Sergey Sharybin
65128d296c Depsgraph: Remove remaining parts of old removed debugger 2017-12-20 15:50:22 +01:00
Sergey Sharybin
f62de28972 Depsgraph: Fix nexted node trees being tagged with wrong flag 2017-12-19 12:37:57 +01:00
Sergey Sharybin
4045a51a11 Depsgraph: Rework tagging and flushing routines
The goal is: have id->recalc flags set to components which got changed.
To make it possible for render engines to check on a more granular basis
what changed in the object. For example, is it a transform which changed
or is it just some ID property changed which has nothing to do with rendering.

The tricky part is: we don't want duplicated logic in tagging and flushing.
In order to avoid this duplication, we store ID recalc flag in the component
node type information. That type information could easily be accessed by both
tagging and flushing routines.

Remaining part of the changes are related on changing the way how tagging
works. The new idea here is to have utility function which maps update tag to
a component. This way we can easily set ID recalc flags right away. Without
any duplication of ID recalc flags set in multiple flag handler functions.

With all this being said, there should be no user measurable difference for
now, it's a gigantic basement for some upcoming work and fixes.
2017-12-19 11:37:22 +01:00
Sergey Sharybin
e4849ad3a6 Depsgraph: Preliminary work to make components to ID recalc flags 2017-12-19 11:37:14 +01:00
Sergey Sharybin
e288afe110 Merge branch 'master' into blender2.8 2017-12-19 08:57:34 +01:00
Sergey Sharybin
a0fa404deb Fix T53547 for real now
Original fix was assuming that particle init operation is updated on every
frame, which is wrong behavior and that was fixed in previous commit to the
original bugfix.
2017-12-19 08:56:11 +01:00
Sergey Sharybin
57f2cc918b Depsgraph: Cleanup, line length 2017-12-18 16:55:04 +01:00
Sergey Sharybin
e57fe5cd95 Depsgraph: Use named typedef for tag 2017-12-18 16:53:12 +01:00
Sergey Sharybin
94d34ae205 Depsgraph: Cleanup, typo in comment 2017-12-18 16:52:46 +01:00
Sergey Sharybin
90021402e2 Merge branch 'master' into blender2.8 2017-12-18 16:51:05 +01:00
Sergey Sharybin
443789d7c6 Depsgraph: Add facilities to store what ID recalc flag component corresponds to
The idea is to de-duplicate logic in DEG_id_tag_update() and flushing where we
need to translate depsgraph tag or component type to ID level recalc flag.

Currently unused, but is required for Blender 2.8.
2017-12-18 16:46:32 +01:00
Sergey Sharybin
342226a670 Depsgraph: Synchronize flushing with 2.8 branch
Not only this helps merges form master to the branch, but also:

- Allows us to production-check changes as soon as possible.
- Avoids some unnecessary editors update about ID changes.
- Adds small optimization on queue size by always keeping one of the pointers
  outside of the queue.
2017-12-18 16:33:12 +01:00
Sergey Sharybin
344eff9c48 Depsgraph: Add query API to traverse all dependent IDs of the given ID 2017-12-18 16:15:47 +01:00
Sergey Sharybin
c5d9eb88e2 Depsgraph: Replace iteration over ghash with iteration over flat array 2017-12-18 16:14:50 +01:00
Sergey Sharybin
8fe556a337 Depsgraph: Introduce flat list of ID nodes
The idea is to allow iterating over ID nodes in exact order of their
construction, and in order which will not change dependent on memory
pointers or anything.
2017-12-18 16:10:22 +01:00
Sergey Sharybin
68ffb2a267 Merge branch 'master' into blender2.8 2017-12-15 17:55:23 +01:00
Sergey Sharybin
50ef25d73f Depsgraph: Cleanup, remove unused function 2017-12-15 17:47:15 +01:00
Sergey Sharybin
da570fcbb4 Depsgraph: Cleanup, make naming more understandable 2017-12-15 17:46:30 +01:00
Sergey Sharybin
3d72b94196 Depsgraph: Use array instead of set for node factory
Avoids extra time spent on hashing and such.

Old comment is kind of weird, because types we can totally make a sequent
integer values.
2017-12-15 17:43:07 +01:00