diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-19 18:49:08 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-19 18:49:38 +0300 |
commit | 93d4752dbe67882dd0883e31fe94c3b541fcb0f7 (patch) | |
tree | 6821a0a8a74a757384b0c3a9be59513bfc90dd09 | |
parent | 3614d9d2a218bb5c739832484b98989cdee3b3d3 (diff) |
Depsgraph: Correction for the previous commit
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index ae95d32ea40..c17277beca1 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1899,11 +1899,13 @@ void DepsgraphRelationBuilder::build_object_data_geometry(Object *object) add_relation(geom_init_key, obdata_ubereval_key, "Object Geometry UberEval"); - ComponentKey object_shading_key(&object->id, DEG_NODE_TYPE_SHADING); - DepsRelation *rel = add_relation(obdata_ubereval_key, - object_shading_key, - "Object Geometry batch Update"); - rel->flag |= DEPSREL_FLAG_NO_FLUSH; + if (object->totcol != 0) { + ComponentKey object_shading_key(&object->id, DEG_NODE_TYPE_SHADING); + DepsRelation *rel = add_relation(obdata_ubereval_key, + object_shading_key, + "Object Geometry batch Update"); + rel->flag |= DEPSREL_FLAG_NO_FLUSH; + } } if (object->type == OB_MBALL) { Object *mom = BKE_mball_basis_find(scene_, object); |