diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-14 18:12:47 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-06-14 18:35:01 +0300 |
commit | 648a352bbfdb76128bbaf575f7aa23bf535f4fda (patch) | |
tree | 56d1b48a5d8ac1924db347974f52fc2243de8e77 /source/blender/editors/animation/anim_motion_paths.c | |
parent | 0cd720e3a5d5bf64770bf6a6df1c414cd0ded30b (diff) |
Fix T65630: Paste pose doesn't work with motion paths enabled
Diffstat (limited to 'source/blender/editors/animation/anim_motion_paths.c')
-rw-r--r-- | source/blender/editors/animation/anim_motion_paths.c | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/source/blender/editors/animation/anim_motion_paths.c b/source/blender/editors/animation/anim_motion_paths.c index e3c4e2a8cfb..d3c6109afcd 100644 --- a/source/blender/editors/animation/anim_motion_paths.c +++ b/source/blender/editors/animation/anim_motion_paths.c @@ -250,8 +250,20 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph, /* get copies of objects/bones to get the calculated results from * (for copy-on-write evaluation), so that we actually get some results */ - // TODO: Create a copy of background depsgraph that only contain these entities, - // and only evaluates them. + + /* TODO: Create a copy of background depsgraph that only contain these entities, + * and only evaluates them. + * + * For until that is done we force dependency graph to not be active, so we don't loose unkeyed + * changes during updating the motion path. + * This still doesn't include unkeyed changes to the path itself, but allows to have updates in + * an environment when auto-keying and pose paste is used. */ + + const bool is_active_depsgraph = DEG_is_active(depsgraph); + if (is_active_depsgraph) { + DEG_make_inactive(depsgraph); + } + for (MPathTarget *mpt = targets->first; mpt; mpt = mpt->next) { mpt->ob_eval = DEG_get_evaluated_object(depsgraph, mpt->ob); @@ -317,6 +329,10 @@ void animviz_calc_motionpaths(Depsgraph *depsgraph, motionpaths_calc_update_scene(bmain, depsgraph); } + if (is_active_depsgraph) { + DEG_make_active(depsgraph); + } + /* clear recalc flags from targets */ for (MPathTarget *mpt = targets->first; mpt; mpt = mpt->next) { bAnimVizSettings *avs; |