[Bf-blender-cvs] [6d2100f7de1] master: Depsgraph: Introduce operation code for visibility operation

Sergey Sharybin noreply at git.blender.org
Tue Jul 19 13:03:35 CEST 2022


Commit: 6d2100f7de1002623172ede914fa754d714f71d8
Author: Sergey Sharybin
Date:   Tue Jul 19 13:00:19 2022 +0200
Branches: master
https://developer.blender.org/rB6d2100f7de1002623172ede914fa754d714f71d8

Depsgraph: Introduce operation code for visibility operation

No functional changes, just makes code more semantically clear.

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
M	source/blender/depsgraph/intern/node/deg_node_operation.cc
M	source/blender/depsgraph/intern/node/deg_node_operation.h

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index ead0bdab3b2..473dda2290c 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -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;
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.cc b/source/blender/depsgraph/intern/node/deg_node_operation.cc
index c29aeefd9b2..3029379d141 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.cc
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.cc
@@ -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";
diff --git a/source/blender/depsgraph/intern/node/deg_node_operation.h b/source/blender/depsgraph/intern/node/deg_node_operation.h
index d4916be1113..aaa508ab3e8 100644
--- a/source/blender/depsgraph/intern/node/deg_node_operation.h
+++ b/source/blender/depsgraph/intern/node/deg_node_operation.h
@@ -34,6 +34,7 @@ enum class OperationCode {
   PARAMETERS_ENTRY,
   PARAMETERS_EVAL,
   PARAMETERS_EXIT,
+  VISIBILITY,
 
   /* Animation, Drivers, etc. --------------------------------------------- */
   /* NLA + Action */



More information about the Bf-blender-cvs mailing list