Depsgraph: Make name and name tag optional in component node

Matches the builder API, making some code less verbose.
This commit is contained in:
2022-07-19 11:31:44 +02:00
parent ff98b5eaa8
commit d3c063188e
2 changed files with 11 additions and 9 deletions

View File

@@ -174,15 +174,13 @@ IDNode *DepsgraphNodeBuilder::add_id_node(ID *id)
ComponentNode *comp_cow = id_node->add_component(NodeType::COPY_ON_WRITE);
OperationNode *op_cow = comp_cow->add_operation(
[id_node](::Depsgraph *depsgraph) { deg_evaluate_copy_on_write(depsgraph, id_node); },
OperationCode::COPY_ON_WRITE,
"",
-1);
OperationCode::COPY_ON_WRITE);
graph_->operations.append(op_cow);
}
ComponentNode *visibility_component = id_node->add_component(NodeType::VISIBILITY);
OperationNode *visibility_operation = visibility_component->add_operation(
nullptr, OperationCode::OPERATION, "", -1);
nullptr, OperationCode::OPERATION);
/* Pin the node so that it and its relations are preserved by the unused nodes/relations
* deletion. This is mainly to make it easier to debug visibility. */
visibility_operation->flag |= OperationFlag::DEPSOP_FLAG_PINNED;