diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-19 18:14:27 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-09-19 18:16:03 +0300 |
commit | 828c0e98139e81fea2ce0e40b0d1f95dd1d44eed (patch) | |
tree | 22a1443f3a08c8b859a11d1acb0df19a33d969f5 | |
parent | 63c636518f583251aa78fe333d77fb7e0d10b2ef (diff) |
Depsgraph: Ensure shading update order
Previously it was possible to have geometry component to
tag batch for DIRTY_ALL and shading to tag with SHADING_UPDATE.
Now there is a relation between uber eval and shading, which
solves this issue.
-rw-r--r-- | source/blender/depsgraph/intern/builder/deg_builder_relations.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc index 002369b7910..ae95d32ea40 100644 --- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc +++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc @@ -1899,6 +1899,11 @@ 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->type == OB_MBALL) { Object *mom = BKE_mball_basis_find(scene_, object); |