Depsgraph: Use operation code for dupli-group
authorSergey Sharybin <sergey.vfx@gmail.com>
Fri, 1 Feb 2019 09:54:37 +0000 (10:54 +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/node/deg_node_operation.cc
source/blender/depsgraph/intern/node/deg_node_operation.h

index 408b21a7fb99ec8a713f66f81e0f5dc944c44d01..01ce2f823355a90114a628570a0692e54eff6eb8 100644 (file)
@@ -647,8 +647,7 @@ void DepsgraphNodeBuilder::build_object(int base_index,
                add_operation_node(&object->id,
                                   NodeType::DUPLI,
                                   NULL,
-                                  OperationCode::PLACEHOLDER,
-                                  "Dupli");
+                                  OperationCode::DUPLI);
        }
        /* Syncronization back to original object. */
        add_operation_node(&object->id,
index 72256e35ea8e46ddfb61865b5f4d03f1e82088b3..cf4671bf72be6ec424acdf31e23bf0ae914177d9 100644 (file)
@@ -123,6 +123,8 @@ const char *operationCodeAsString(OperationCode opcode)
                /* Generic datablock. */
                case OperationCode::GENERIC_DATABLOCK_UPDATE:
                        return "GENERIC_DATABLOCK_UPDATE";
+               /* instancing/duplication. */
+               case OperationCode::DUPLI: return "DUPLI";
        }
        BLI_assert(!"Unhandled operation code, should never happen.");
        return "UNKNOWN";
index 30818c20d695605a8b1759bcaa0fe056042a8540..7a6df7cf1615de96361f0de84d546e7290a4994f 100644 (file)
@@ -174,6 +174,9 @@ enum class OperationCode {
 
        /* Generic datablock ---------------------------------------------------- */
        GENERIC_DATABLOCK_UPDATE,
+
+       /* Duplication/instancing system. --------------------------------------- */
+       DUPLI,
 };
 const char *operationCodeAsString(OperationCode opcode);