Depsgraph: Cleanup, don't use view layer name
authorSergey Sharybin <sergey.vfx@gmail.com>
Thu, 23 Nov 2017 11:20:31 +0000 (12:20 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Thu, 23 Nov 2017 13:44:14 +0000 (14:44 +0100)
Dependency graph is only built per-view-layer now, so no need to store names.
Will speed up operation lookup as well,.

source/blender/depsgraph/intern/builder/deg_builder_nodes_layer_collection.cc
source/blender/depsgraph/intern/builder/deg_builder_relations_layer_collection.cc

index 77985528c8902a7a6361c6735bc81add0e4f9250..71303db54ef43cad13e922594ee650c703d0e4fa 100644 (file)
@@ -126,14 +126,12 @@ void DepsgraphNodeBuilder::build_view_layer_collections(
                                         _1,
                                         scene_cow,
                                         view_layer_cow),
-                          DEG_OPCODE_VIEW_LAYER_INIT,
-                          view_layer->name);
+                          DEG_OPCODE_VIEW_LAYER_INIT);
        add_operation_node(comp,
                           function_bind(BKE_layer_eval_layer_collection_post,
                                         _1,
                                         view_layer_cow),
-                          DEG_OPCODE_VIEW_LAYER_DONE,
-                          view_layer->name);
+                          DEG_OPCODE_VIEW_LAYER_DONE);
        state.parent = NULL;
        build_layer_collections(&view_layer_cow->layer_collections, &state);
 }
index 2e4ab0f0f841efb883fe7561905b37af8f6a8415..a7c70bfc098519295868adc39fe78f3852b7c505 100644 (file)
@@ -104,12 +104,10 @@ void DepsgraphRelationBuilder::build_view_layer_collections(
 
        OperationKey init_key(&scene_->id,
                              DEG_NODE_TYPE_LAYER_COLLECTIONS,
-                             DEG_OPCODE_VIEW_LAYER_INIT,
-                             view_layer->name);
+                             DEG_OPCODE_VIEW_LAYER_INIT);
        OperationKey done_key(&scene_->id,
                              DEG_NODE_TYPE_LAYER_COLLECTIONS,
-                             DEG_OPCODE_VIEW_LAYER_DONE,
-                             view_layer->name);
+                             DEG_OPCODE_VIEW_LAYER_DONE);
 
        state.init_key = init_key;
        state.done_key = done_key;