[Bf-blender-cvs] [b5f5e6ce298] blender2.8: Depsgraph: Fix missing node tree update when adding keyframes

Sergey Sharybin noreply at git.blender.org
Mon Apr 30 15:16:55 CEST 2018


Commit: b5f5e6ce2981971783511d3bc9adeddc674e1715
Author: Sergey Sharybin
Date:   Mon Apr 30 15:16:11 2018 +0200
Branches: blender2.8
https://developer.blender.org/rBb5f5e6ce2981971783511d3bc9adeddc674e1715

Depsgraph: Fix missing node tree update when adding keyframes

Need to make sure animation data is copied from original tree to a copy,
it is NOT enough to only copy node socket values.

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

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 193c1c38710..d07c8c737ad 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
@@ -78,6 +78,7 @@ extern "C" {
 #endif
 
 #include "BKE_action.h"
+#include "BKE_animsys.h"
 #include "BKE_editmesh.h"
 #include "BKE_library_query.h"
 #include "BKE_object.h"
@@ -603,6 +604,13 @@ ID *deg_expand_copy_on_write_datablock(const Depsgraph *depsgraph,
 	                                          create_placeholders);
 }
 
+static void deg_update_copy_on_write_animation(const Depsgraph * /*depsgraph*/,
+                                               const IDDepsNode *id_node)
+{
+	DEG_debug_print_eval(__func__, id_node->id_orig->name, id_node->id_cow);
+	BKE_animdata_copy_id(NULL, id_node->id_cow, id_node->id_orig, false);
+}
+
 ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
                                        const IDDepsNode *id_node)
 {
@@ -657,6 +665,7 @@ ID *deg_update_copy_on_write_datablock(const Depsgraph *depsgraph,
 				                         ID_RECALC_ANIMATION |
 				                         ID_RECALC_COPY_ON_WRITE);
 				if ((id_cow->recalc & ~ignore_flag) == 0) {
+					deg_update_copy_on_write_animation(depsgraph, id_node);
 					return id_cow;
 				}
 				break;



More information about the Bf-blender-cvs mailing list