diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-03-17 14:47:29 +0300 |
---|---|---|
committer | Dalai Felinto <dfelinto@gmail.com> | 2017-04-01 02:27:08 +0300 |
commit | eba09b1520c06df304bc353e93d7220b4e83b755 (patch) | |
tree | 27f1e1e397a78b3f2f11a986599ee82d7bbcb89d /source/blender/makesdna/DNA_layer_types.h | |
parent | 97b9afda3719627b9e52d1862ffd3b0b3ef12518 (diff) |
Blender 2.8: Hook of layer collections evaluation in DEG
This moves selectability/visibility flag flush from some hardcoded
places in the code to depsgraph. This way it is possible to simply
tag depsgraph to update those flags and rest it'll do on its own.
Using depsgraph for such flush is an overkill: those flags are fully
static and can not be animated, so it doesn't really make sense to
hook only those to depsgraph.
However, in the future we will have overrides on collections, which
ideally would need to be animatable and drivable and easiest way
to support this is to do this on depsgraph level, so it ensures
proper order of evaluation for animation and drivers. And it seems
logical to do both overrides and flags flush from depsgraph from
this point of view.
This commit also includes the evaluation of IDProperty for collections,
which basically are just another form of override. So once we implement
the other kind of overrides the flushing and collection evaluation won't
change.
Patch by Sergey Sharybin and Dalai Felinto
Diffstat (limited to 'source/blender/makesdna/DNA_layer_types.h')
-rw-r--r-- | source/blender/makesdna/DNA_layer_types.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/source/blender/makesdna/DNA_layer_types.h b/source/blender/makesdna/DNA_layer_types.h index fa419103a77..6fe3a9f1c8a 100644 --- a/source/blender/makesdna/DNA_layer_types.h +++ b/source/blender/makesdna/DNA_layer_types.h @@ -43,6 +43,7 @@ typedef struct Base { unsigned int lay; int flag_legacy; int pad; + struct IDProperty *collection_properties; /* used by depsgraph, flushed from collection-tree */ } Base; typedef struct CollectionOverride { @@ -55,11 +56,14 @@ typedef struct LayerCollection { struct LayerCollection *next, *prev; struct SceneCollection *scene_collection; short flag; - short pad[3]; + /* TODO(sergey): Get rid of this once we've got CoW in DEG, */ + short flag_evaluated; + short pad[2]; ListBase object_bases; /* (ObjectBase *)LinkData->data - synced with collection->objects and collection->filter_objects */ ListBase overrides; ListBase layer_collections; /* synced with collection->collections */ struct IDProperty *properties; /* overrides */ + struct IDProperty *properties_evaluated; } LayerCollection; typedef struct SceneLayer { |