diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-05-02 16:31:49 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-05-02 16:31:49 +0300 |
commit | 143d7ad40f384f2df450730253c9b784dfe57333 (patch) | |
tree | feddc422562ad844c5c3b078c59270af6d1b9479 /source | |
parent | 4384a7cf463eedea83179da80bbe12ff7d55578a (diff) |
Revert "Depsgraph: Link from material to object shading"
The change was initially needed for Blender 2.8 branch but the actual
function was reverted in there. So no reason to keep dead unused
placeholder in the dependency graph.
This reverts commit fd69ba225540cde5e4c1fa651fb02df21ea0a143.
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_nodes.cc | 15 | ||||
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 9 |
2 files changed, 5 insertions, 19 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc index 7bcaee61fe0..7df9fe0bdc8 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc @@ -854,18 +854,11 @@ void DepsgraphNodeBuilder::build_obdata_geom(Scene *scene, Object *ob) } /* materials */ - if (ob->totcol != 0) { - for (int a = 1; a <= ob->totcol; a++) { - Material *ma = give_current_material(ob, a); - if (ma != NULL) { - build_material(ma); - } + for (int a = 1; a <= ob->totcol; a++) { + Material *ma = give_current_material(ob, a); + if (ma != NULL) { + build_material(ma); } - add_operation_node(&ob->id, - DEPSNODE_TYPE_SHADING, - DEPSOP_TYPE_EXEC, - NULL, - DEG_OPCODE_PLACEHOLDER, "Material Update"); } /* geometry collision */ diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 7f2c6d8d9a1..2dae3daaab2 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1489,18 +1489,11 @@ void DepsgraphRelationBuilder::build_obdata_geom(Main *bmain, Scene *scene, Obje } /* materials */ - if (ob->totcol != 0) { - ComponentKey object_shading_key(&ob->id, DEPSNODE_TYPE_SHADING); + if (ob->totcol) { for (int a = 1; a <= ob->totcol; a++) { Material *ma = give_current_material(ob, a); if (ma != NULL) { build_material(ma); - ComponentKey material_shading_key(&ma->id, - DEPSNODE_TYPE_SHADING); - add_relation(material_shading_key, - object_shading_key, - DEPSREL_TYPE_UPDATE, - "Object Shading"); } } } |