diff options
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 71e1a0d2171..50c52a519b4 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -762,22 +762,21 @@ void DepsgraphRelationBuilder::build_object_from_layer_relations(Object *object) OperationKey object_flags_key( &object->id, NodeType::OBJECT_FROM_LAYER, OperationCode::OBJECT_BASE_FLAGS); - /* Only connect Entry -> Exit if there is no OBJECT_BASE_FLAGS node. */ - if (has_node(object_flags_key)) { - /* Entry -> OBJECT_BASE_FLAGS -> Exit */ - add_relation(object_from_layer_entry_key, object_flags_key, "Base flags flush Entry"); - add_relation(object_flags_key, object_from_layer_exit_key, "Base flags flush Exit"); - - /* Synchronization back to original object. */ - OperationKey synchronize_key( - &object->id, NodeType::SYNCHRONIZATION, OperationCode::SYNCHRONIZE_TO_ORIGINAL); - add_relation(object_from_layer_exit_key, synchronize_key, "Synchronize to Original"); - } - else { - /* Directly connect Entry -> Exit. */ + if (!has_node(object_flags_key)) { + /* Just connect Entry -> Exit if there is no OBJECT_BASE_FLAGS node. */ add_relation(object_from_layer_entry_key, object_from_layer_exit_key, "Object from Layer"); + return; } + /* Entry -> OBJECT_BASE_FLAGS -> Exit */ + add_relation(object_from_layer_entry_key, object_flags_key, "Base flags flush Entry"); + add_relation(object_flags_key, object_from_layer_exit_key, "Base flags flush Exit"); + + /* Synchronization back to original object. */ + OperationKey synchronize_key( + &object->id, NodeType::SYNCHRONIZATION, OperationCode::SYNCHRONIZE_TO_ORIGINAL); + add_relation(object_from_layer_exit_key, synchronize_key, "Synchronize to Original"); + OperationKey view_layer_done_key( &scene_->id, NodeType::LAYER_COLLECTIONS, OperationCode::VIEW_LAYER_EVAL); add_relation(view_layer_done_key, object_from_layer_entry_key, "View Layer flags to Object"); |