Depsgraph: Introduce operation code for visibility operation

No functional changes, just makes code more semantically clear.
This commit is contained in:
Sergey Sharybin 2022-07-19 13:00:19 +02:00
parent 99faebfca6
commit 6d2100f7de
3 changed files with 4 additions and 1 deletions

View File

@ -180,7 +180,7 @@ IDNode *DepsgraphNodeBuilder::add_id_node(ID *id)
ComponentNode *visibility_component = id_node->add_component(NodeType::VISIBILITY);
OperationNode *visibility_operation = visibility_component->add_operation(
nullptr, OperationCode::OPERATION);
nullptr, OperationCode::VISIBILITY);
/* 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;

View File

@ -32,6 +32,8 @@ const char *operationCodeAsString(OperationCode opcode)
return "PARAMETERS_EVAL";
case OperationCode::PARAMETERS_EXIT:
return "PARAMETERS_EXIT";
case OperationCode::VISIBILITY:
return "VISIBILITY";
/* Animation, Drivers, etc. */
case OperationCode::ANIMATION_ENTRY:
return "ANIMATION_ENTRY";

View File

@ -34,6 +34,7 @@ enum class OperationCode {
PARAMETERS_ENTRY,
PARAMETERS_EVAL,
PARAMETERS_EXIT,
VISIBILITY,
/* Animation, Drivers, etc. --------------------------------------------- */
/* NLA + Action */