diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-08-29 18:03:07 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-08-29 18:03:07 +0300 |
commit | 9deccce07d0d60ab940f980cc81802152c882615 (patch) | |
tree | 9642a8642a3121b46ce68d5fc8866f7d1fc7a96f /source/blender/depsgraph/intern | |
parent | 852d702da0a3262378fd08abcb42bfa0edf3cdfd (diff) |
Depsgraph: Fix missing material update when driving property in a group
Diffstat (limited to 'source/blender/depsgraph/intern')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 8 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 27 |
2 files changed, 9 insertions, 26 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index d29b87a0742..8e39695ff15 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -1100,23 +1100,15 @@ void DepsgraphNodeBuilder::build_nodetree(bNodeTree *ntree) } /* nodetree itself */ ID *ntree_id = &ntree->id; - OperationDepsNode *op_node; add_id_node(ntree_id); bNodeTree *ntree_cow = get_cow_datablock(ntree); /* Animation, */ build_animdata(ntree_id); - /* Parameters for drivers. */ - op_node = add_operation_node(ntree_id, - DEG_NODE_TYPE_PARAMETERS, - NULL, - DEG_OPCODE_PARAMETERS_EVAL); - op_node->set_as_exit(); /* Shading update. */ add_operation_node(ntree_id, DEG_NODE_TYPE_SHADING, NULL, DEG_OPCODE_MATERIAL_UPDATE); - add_operation_node(ntree_id, DEG_NODE_TYPE_SHADING_PARAMETERS, function_bind(BKE_nodetree_shading_params_eval, diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 87f7117bb14..febdd471f64 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1094,9 +1094,7 @@ void DepsgraphRelationBuilder::build_driver(ID *id, FCurve *fcu) } case ID_NT: { - OperationKey ntree_key(id, - DEG_NODE_TYPE_PARAMETERS, - DEG_OPCODE_PARAMETERS_EVAL); + ComponentKey ntree_key(id, DEG_NODE_TYPE_SHADING); add_relation(driver_key, ntree_key, "[Driver -> NTree Shading Update]"); @@ -1786,7 +1784,7 @@ void DepsgraphRelationBuilder::build_lamp(Object *ob) /* lamp's nodetree */ if (la->nodetree) { build_nodetree(la->nodetree); - ComponentKey nodetree_key(&la->nodetree->id, DEG_NODE_TYPE_PARAMETERS); + ComponentKey nodetree_key(&la->nodetree->id, DEG_NODE_TYPE_SHADING); add_relation(nodetree_key, parameters_key, "NTree->Lamp Parameters"); } @@ -1811,17 +1809,12 @@ void DepsgraphRelationBuilder::build_lamp(Object *ob) void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree) { - if (!ntree) + if (ntree == NULL) { return; - + } ID *ntree_id = &ntree->id; - build_animdata(ntree_id); - - OperationKey parameters_key(ntree_id, - DEG_NODE_TYPE_PARAMETERS, - DEG_OPCODE_PARAMETERS_EVAL); - + ComponentKey shading_key(ntree_id, DEG_NODE_TYPE_SHADING); /* nodetree's nodes... */ LINKLIST_FOREACH (bNode *, bnode, &ntree->nodes) { if (bnode->id) { @@ -1837,17 +1830,16 @@ void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree) build_nodetree(group_ntree); group_ntree->id.tag |= LIB_TAG_DOIT; } - OperationKey group_parameters_key(&group_ntree->id, - DEG_NODE_TYPE_PARAMETERS, - DEG_OPCODE_PARAMETERS_EVAL); - add_relation(group_parameters_key, parameters_key, "Group Node"); + ComponentKey group_shading_key(&group_ntree->id, + DEG_NODE_TYPE_SHADING); + add_relation(group_shading_key, shading_key, "Group Node"); } } } if (needs_animdata_node(ntree_id)) { ComponentKey animation_key(ntree_id, DEG_NODE_TYPE_ANIMATION); - add_relation(animation_key, parameters_key, "NTree Parameters"); + add_relation(animation_key, shading_key, "NTree Parameters"); } OperationKey shading_update_key(ntree_id, @@ -1856,7 +1848,6 @@ void DepsgraphRelationBuilder::build_nodetree(bNodeTree *ntree) OperationKey shading_parameters_key(ntree_id, DEG_NODE_TYPE_SHADING_PARAMETERS, DEG_OPCODE_MATERIAL_UPDATE); - add_relation(parameters_key, shading_update_key, "NTree Parameters"); add_relation(shading_parameters_key, shading_update_key, "NTree Shading Parameters"); } |