[Bf-blender-cvs] [95b388c3df5] blender2.8: Depsgraph: Fix missing action re-map with node tree update

Sergey Sharybin noreply at git.blender.org
Thu May 3 14:16:22 CEST 2018


Commit: 95b388c3df5d861baabbe5c02e619424d13f2253
Author: Sergey Sharybin
Date:   Thu May 3 14:15:09 2018 +0200
Branches: blender2.8
https://developer.blender.org/rB95b388c3df5d861baabbe5c02e619424d13f2253

Depsgraph: Fix missing action re-map with node tree update

After copying animation data we need to re-map action, otherwise
our original DNA values will go out of symc, causing flickering
when tweaking values on animated node tree.

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

M	source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc

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

diff --git a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
index 2c6186a4fe5..99c24506a7b 100644
--- a/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
+++ b/source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc
@@ -547,7 +547,7 @@ ID *deg_expand_copy_on_write_datablock(const Depsgraph *depsgraph,
 	 */
 	deg_tag_copy_on_write_id(id_cow, id_orig);
 	/* Perform remapping of the nodes. */
-	RemapCallbackUserData user_data;
+	RemapCallbackUserData user_data = {NULL};
 	user_data.depsgraph = depsgraph;
 	user_data.node_builder = node_builder;
 	user_data.create_placeholders = create_placeholders;
@@ -586,6 +586,13 @@ static void deg_update_copy_on_write_animation(const Depsgraph *depsgraph,
 	                     id_node->id_orig->name,
 	                     id_node->id_cow);
 	BKE_animdata_copy_id(NULL, id_node->id_cow, id_node->id_orig, false, false);
+	RemapCallbackUserData user_data = {NULL};
+	user_data.depsgraph = depsgraph;
+	BKE_library_foreach_ID_link(NULL,
+	                            id_node->id_cow,
+	                            foreach_libblock_remap_callback,
+	                            (void *)&user_data,
+	                            IDWALK_NOP);
 }
 
 ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,



More information about the Bf-blender-cvs mailing list