Depsgraph: Use operation code for geometry evaluation done
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 1 Feb 2019 09:42:50 +0000 (10:42 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Fri, 1 Feb 2019 14:40:19 +0000 (15:40 +0100)
source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/node/deg_node_operation.cc
source/blender/depsgraph/intern/node/deg_node_operation.h

index 8b29ebc..408b21a 100644 (file)
@@ -1387,8 +1387,10 @@ void DepsgraphNodeBuilder::build_object_data_geometry_datablock(
                        BLI_assert(!"Should not happen");
                        break;
        }
-       op_node = add_operation_node(obdata, NodeType::GEOMETRY, NULL,
-                                    OperationCode::PLACEHOLDER, "Eval Done");
+       op_node = add_operation_node(obdata,
+                                    NodeType::GEOMETRY,
+                                    NULL,
+                                    OperationCode::GEOMETRY_EVAL_DONE);
        op_node->set_as_exit();
        /* Parameters for driver sources. */
        add_operation_node(obdata,
index cb5c811..ac827d8 100644 (file)
@@ -2122,11 +2122,10 @@ void DepsgraphRelationBuilder::build_object_data_geometry_datablock(ID *obdata)
        }
        /* Link object data evaluation node to exit operation. */
        OperationKey obdata_geom_eval_key(
-               obdata, NodeType::GEOMETRY, OperationCode::PLACEHOLDER);
+               obdata, NodeType::GEOMETRY, OperationCode::GEOMETRY_EVAL);
        OperationKey obdata_geom_done_key(obdata,
-               NodeType::GEOMETRY,
-               OperationCode::PLACEHOLDER,
-               "Eval Done");
+                                         NodeType::GEOMETRY,
+                                         OperationCode::GEOMETRY_EVAL_DONE);
        add_relation(obdata_geom_eval_key,
                     obdata_geom_done_key,
                     "ObData Geom Eval Done");
index 9004451..72256e3 100644 (file)
@@ -66,6 +66,7 @@ const char *operationCodeAsString(OperationCode opcode)
                /* Geometry. */
                case OperationCode::GEOMETRY_EVAL_INIT: return "GEOMETRY_EVAL_INIT";
                case OperationCode::GEOMETRY_EVAL: return "GEOMETRY_EVAL";
+               case OperationCode::GEOMETRY_EVAL_DONE: return "GEOMETRY_EVAL_DONE";
                case OperationCode::GEOMETRY_SHAPEKEY: return "GEOMETRY_SHAPEKEY";
                /* Object data. */
                case OperationCode::LIGHT_PROBE_EVAL: return "LIGHT_PROBE_EVAL";
index 3cb49cc..30818c2 100644 (file)
@@ -89,7 +89,10 @@ enum class OperationCode {
        GEOMETRY_EVAL_INIT,
        /* Evaluate the whole geometry, including modifiers. */
        GEOMETRY_EVAL,
-       /* Evaluation of a shape key. */
+       /* Evaluation of geometry is completely done.. */
+       GEOMETRY_EVAL_DONE,
+       /* Evaluation of a shape key.
+        * NOTE: Currently only for object data datablocks. */
        GEOMETRY_SHAPEKEY,
 
        /* Object data. --------------------------------------------------------- */