From eba09b1520c06df304bc353e93d7220b4e83b755 Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Fri, 17 Mar 2017 12:47:29 +0100 Subject: 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 --- source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc') diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc index 2e2182609d5..3a007c4153a 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations_scene.cc @@ -116,6 +116,9 @@ void DepsgraphRelationBuilder::build_scene(Main *bmain, Scene *scene) build_movieclip(clip); } + /* Collections. */ + build_scene_layer_collections(scene); + for (Depsgraph::OperationNodes::const_iterator it_op = m_graph->operations.begin(); it_op != m_graph->operations.end(); ++it_op) -- cgit v1.2.3