diff options
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 7 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 6 |
2 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index a109c5d8d88..dcdf2f48607 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -155,7 +155,6 @@ IDNode *DepsgraphNodeBuilder::add_id_node(ID *id) { BLI_assert(id->session_uuid != MAIN_ID_SESSION_UUID_UNSET); - const ID_Type id_type = GS(id->name); IDNode *id_node = nullptr; ID *id_cow = nullptr; IDComponentsMask previously_visible_components_mask = 0; @@ -174,8 +173,10 @@ IDNode *DepsgraphNodeBuilder::add_id_node(ID *id) id_node->previously_visible_components_mask = previously_visible_components_mask; id_node->previous_eval_flags = previous_eval_flags; id_node->previous_customdata_masks = previous_customdata_masks; - /* NOTE: Zero number of components indicates that ID node was just created. */ - if (id_node->components.is_empty() && deg_copy_on_write_is_needed(id_type)) { + /* Currently all ID nodes are supposed to have copy-on-write logic. + * + * NOTE: Zero number of components indicates that ID node was just created. */ + if (id_node->components.is_empty()) { ComponentNode *comp_cow = id_node->add_component(NodeType::COPY_ON_WRITE); OperationNode *op_cow = comp_cow->add_operation( function_bind(deg_evaluate_copy_on_write, _1, id_node), diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 5f591b4aee0..fcaa3854d37 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -2788,13 +2788,7 @@ void DepsgraphRelationBuilder::build_nested_shapekey(ID *owner, Key *key) void DepsgraphRelationBuilder::build_copy_on_write_relations(IDNode *id_node) { ID *id_orig = id_node->id_orig; - const ID_Type id_type = GS(id_orig->name); - - if (!deg_copy_on_write_is_needed(id_type)) { - return; - } - TimeSourceKey time_source_key; OperationKey copy_on_write_key(id_orig, NodeType::COPY_ON_WRITE, OperationCode::COPY_ON_WRITE); /* XXX: This is a quick hack to make Alt-A to work. */ |