[Bf-blender-cvs] [d37929c85b8] blender2.8: Depsgraph: Force modifier stack update when mesh is copied

Sergey Sharybin noreply at git.blender.org
Mon Jul 9 14:54:00 CEST 2018


Commit: d37929c85b88066ca044050ba520627b6364d93c
Author: Sergey Sharybin
Date:   Mon Jul 9 14:17:36 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBd37929c85b88066ca044050ba520627b6364d93c

Depsgraph: Force modifier stack update when mesh is copied

Modifier stack might reference arrays from mesh, so if any of sub-data
pointer changed, modifier stack is to be re-evaluated.

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder_relations.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index 1eaf53a0afc..7a5d2b4afa4 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2186,7 +2186,7 @@ void DepsgraphRelationBuilder::build_nested_shapekey(ID *owner, Key *key)
 void DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node)
 {
 	ID *id_orig = id_node->id_orig;
-
+	const ID_Type id_type = GS(id_orig->name);
 	TimeSourceKey time_source_key;
 	OperationKey copy_on_write_key(id_orig,
 	                               DEG_NODE_TYPE_COPY_ON_WRITE,
@@ -2210,6 +2210,9 @@ void DepsgraphRelationBuilder::build_copy_on_write_relations(IDDepsNode *id_node
 			continue;
 		}
 		int rel_flag = DEPSREL_FLAG_NO_FLUSH;
+		if (id_type == ID_ME && comp_node->type == DEG_NODE_TYPE_GEOMETRY) {
+			rel_flag &= ~DEPSREL_FLAG_NO_FLUSH;
+		}
 		/* All entry operations of each component should wait for a proper
 		 * copy of ID.
 		 */



More information about the Bf-blender-cvs mailing list