Merge branch 'master' into blender2.8
[blender.git] / source / blender / depsgraph / intern / nodes / deg_node_component.cc
index 26678d5b23a9620c1ff671c446068618289e9eec..aca25acd7c3f3b0611b93cfb7cf6d86ecb18330d 100644 (file)
@@ -123,8 +123,7 @@ static void comp_node_hash_value_free(void *value_v)
 
 ComponentDepsNode::ComponentDepsNode() :
     entry_operation(NULL),
-    exit_operation(NULL),
-    layers(0)
+    exit_operation(NULL)
 {
        operations_map = BLI_ghash_new(comp_node_hash_key,
                                       comp_node_hash_key_cmp,
@@ -157,10 +156,7 @@ string ComponentDepsNode::identifier() const
        char typebuf[16];
        sprintf(typebuf, "(%d)", type);
 
-       char layers[16];
-       sprintf(layers, "%u", this->layers);
-
-       return string(typebuf) + name + " : " + idname + " (Layers: " + layers + ")";
+       return string(typebuf) + name + " : " + idname;
 }
 
 OperationDepsNode *ComponentDepsNode::find_operation(OperationIDKey key) const
@@ -206,7 +202,7 @@ OperationDepsNode *ComponentDepsNode::add_operation(const DepsEvalOperationCb& o
        OperationDepsNode *op_node = has_operation(opcode, name, name_tag);
        if (!op_node) {
                DepsNodeFactory *factory = deg_get_node_factory(DEG_NODE_TYPE_OPERATION);
-               op_node = (OperationDepsNode *)factory->create_node(this->owner->id, "", name);
+               op_node = (OperationDepsNode *)factory->create_node(this->owner->id_orig, "", name);
 
                /* register opnode in this component's operation set */
                OperationIDKey *key = OBJECT_GUARDED_NEW(OperationIDKey, opcode, name, name_tag);
@@ -319,7 +315,7 @@ OperationDepsNode *ComponentDepsNode::get_exit_operation()
        return NULL;
 }
 
-void ComponentDepsNode::finalize_build()
+void ComponentDepsNode::finalize_build(Depsgraph * /*graph*/)
 {
        operations.reserve(BLI_ghash_size(operations_map));
        GHASH_FOREACH_BEGIN(OperationDepsNode *, op_node, operations_map)
@@ -344,13 +340,16 @@ static DepsNodeFactoryImpl<name ## ComponentDepsNode> DNTI_ ## NAME
 
 DEG_COMPONENT_DEFINE(Animation, ANIMATION);
 DEG_COMPONENT_DEFINE(Cache, CACHE);
+DEG_COMPONENT_DEFINE(CopyOnWrite, COPY_ON_WRITE);
 DEG_COMPONENT_DEFINE(Geometry, GEOMETRY);
+DEG_COMPONENT_DEFINE(LayerCollections, LAYER_COLLECTIONS);
 DEG_COMPONENT_DEFINE(Parameters, PARAMETERS);
 DEG_COMPONENT_DEFINE(Particles, EVAL_PARTICLES);
 DEG_COMPONENT_DEFINE(Proxy, PROXY);
 DEG_COMPONENT_DEFINE(Pose, EVAL_POSE);
 DEG_COMPONENT_DEFINE(Sequencer, SEQUENCER);
 DEG_COMPONENT_DEFINE(Shading, SHADING);
+DEG_COMPONENT_DEFINE(ShadingParameters, SHADING_PARAMETERS);
 DEG_COMPONENT_DEFINE(Transform, TRANSFORM);
 
 /* Bone Component ========================================= */
@@ -389,9 +388,15 @@ void deg_register_component_depsnodes()
        deg_register_node_typeinfo(&DNTI_BONE);
 
        deg_register_node_typeinfo(&DNTI_EVAL_PARTICLES);
+
        deg_register_node_typeinfo(&DNTI_SHADING);
+       deg_register_node_typeinfo(&DNTI_SHADING_PARAMETERS);
 
        deg_register_node_typeinfo(&DNTI_CACHE);
+
+       deg_register_node_typeinfo(&DNTI_LAYER_COLLECTIONS);
+
+       deg_register_node_typeinfo(&DNTI_COPY_ON_WRITE);
 }
 
 }  // namespace DEG