diff options
author | Jacques Lucke <jacques@blender.org> | 2021-04-26 17:35:22 +0300 |
---|---|---|
committer | Jacques Lucke <jacques@blender.org> | 2021-04-26 17:35:22 +0300 |
commit | b67fe05d4bea2d3c9efbd127e9d9dc3a897e89e6 (patch) | |
tree | 088364c494e90748663f0e29fec61dc8da9149a5 /source/blender/makesdna | |
parent | a65d5dadeb610a8262acb0d9a57b3a15eec14e96 (diff) |
Depsgraph: support depending on collection geometry
This fixes T87666 and T83252.
The boolean modifier and geometry nodes can depend on the geometry
of an entire collection. Before, the modifiers had to manually create relations
to all the objects in the collection. This worked for the most part, but was
cumbersome and did not solve all issues. For example, the modifiers were not
properly updated when objects were added/removed from the referenced collection.
This commit introduces the concept of "collection geometry" in the depsgraph.
The geometry of a collection depends on the transforms and geometry of all
the objects in it. The boolean modifier and geometry nodes can now just depend
on the collection geometry instead of creating all the dependencies themselves.
Differential Revision: https://developer.blender.org/D11053
Diffstat (limited to 'source/blender/makesdna')
-rw-r--r-- | source/blender/makesdna/DNA_ID.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/source/blender/makesdna/DNA_ID.h b/source/blender/makesdna/DNA_ID.h index f9524fac72d..fa60bba54d5 100644 --- a/source/blender/makesdna/DNA_ID.h +++ b/source/blender/makesdna/DNA_ID.h @@ -591,14 +591,16 @@ typedef enum IDRecalcFlag { /* ** Object transformation changed. ** */ ID_RECALC_TRANSFORM = (1 << 0), - /* ** Object geometry changed. ** + /* ** Geometry changed. ** * * When object of armature type gets tagged with this flag, its pose is * re-evaluated. * When object of other type is tagged with this flag it makes the modifier * stack to be re-evaluated. * When object data type (mesh, curve, ...) gets tagged with this flag it - * makes all objects which shares this data-block to be updated. */ + * makes all objects which shares this data-block to be updated. + * When a collection gets tagged with this flag, all objects depending on the geometry and + * transforms on any of the objects in the collection are updated. */ ID_RECALC_GEOMETRY = (1 << 1), /* ** Animation or time changed and animation is to be re-evaluated. ** */ |