Depsgraph: Cleanup, use explicit cloth modifier opcode
authorSergey Sharybin <sergey.vfx@gmail.com>
Wed, 25 Oct 2017 09:34:41 +0000 (11:34 +0200)
committerSergey Sharybin <sergey.vfx@gmail.com>
Wed, 25 Oct 2017 09:34:41 +0000 (11:34 +0200)
Avoids use of placeholder operation which also was involving some string
comparisons.

source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
source/blender/depsgraph/intern/builder/deg_builder_relations.cc
source/blender/depsgraph/intern/depsgraph_type_defines.cc
source/blender/depsgraph/intern/depsgraph_types.h

index a1326e97afac78ce04391c7f6aa706754bc50a66..485cb19d7ee2ae1fc678660be8edd6c77609675e 100644 (file)
@@ -707,8 +707,7 @@ void DepsgraphNodeBuilder::build_cloth(Scene *scene, Object *object)
                                         _1,
                                         scene,
                                         object),
-                          DEG_OPCODE_PLACEHOLDER,
-                          "Cloth Modifier");
+                          DEG_OPCODE_GEOMETRY_CLOTH_MODIFIER);
 }
 
 /* Shapekeys */
index f0f4cf3dc29c1c82378c6e91994dc23920978b0e..ebfd5d404dbab383bec481284d1314be38601f05 100644 (file)
@@ -1419,8 +1419,7 @@ void DepsgraphRelationBuilder::build_cloth(Scene * /*scene*/,
 {
        OperationKey cache_key(&object->id,
                               DEG_NODE_TYPE_CACHE,
-                              DEG_OPCODE_PLACEHOLDER,
-                              "Cloth Modifier");
+                              DEG_OPCODE_GEOMETRY_CLOTH_MODIFIER);
        /* Cache component affects on modifier. */
        OperationKey modifier_key(&object->id,
                                  DEG_NODE_TYPE_GEOMETRY,
index 18074652f2dfeb890e97db99bf44540461bc00d1..29636ed9ae908a285674ab3b96e8378b925ac52b 100644 (file)
@@ -117,6 +117,7 @@ static const char *stringify_opcode(eDepsOperation_Code opcode)
                STRINGIFY_OPCODE(RIGIDBODY_TRANSFORM_COPY);
                /* Geometry. */
                STRINGIFY_OPCODE(GEOMETRY_UBEREVAL);
+               STRINGIFY_OPCODE(GEOMETRY_CLOTH_MODIFIER);
                /* Pose. */
                STRINGIFY_OPCODE(POSE_INIT);
                STRINGIFY_OPCODE(POSE_INIT_IK);
index c6a44902a86a825a3b457855b0fd88de810adf24..26f374f316c2aaf6e5d066b24d575800f4acca33 100644 (file)
@@ -167,6 +167,7 @@ typedef enum eDepsOperation_Code {
        /* Geometry. ---------------------------------------- */
        /* Evaluate the whole geometry, including modifiers. */
        DEG_OPCODE_GEOMETRY_UBEREVAL,
+       DEG_OPCODE_GEOMETRY_CLOTH_MODIFIER,
 
        /* Pose. -------------------------------------------- */
        /* Init pose, clear flags, etc. */