Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2018-04-30 16:16:11 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2018-04-30 16:16:51 +0300
commitb5f5e6ce2981971783511d3bc9adeddc674e1715 (patch)
tree229b4d4fdceb399e215c9adcf5ba98bc3c31f8c6 /source/blender/depsgraph/intern
parent05cf7863c346dd28af812457209c8fcc5154d6fa (diff)
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.
Diffstat (limited to 'source/blender/depsgraph/intern')
-rw-r--r--source/blender/depsgraph/intern/eval/deg_eval_copy_on_write.cc9
1 files changed, 9 insertions, 0 deletions
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;