diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-29 12:01:55 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2019-03-29 12:01:55 +0300 |
commit | d724363a39564f5d4d4c768f789467c95aacfcdf (patch) | |
tree | 22f2aee590a158d2b7fcd7a21aa32f4196bdac8e /source/blender/editors/animation | |
parent | 99d4321feff632c0824ee7448e2997e8da2849b4 (diff) |
Fix T62908: Missing update when inserting keyframe from dopesheet
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_channels_defines.c | 7 | ||||
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 7 |
2 files changed, 13 insertions, 1 deletions
diff --git a/source/blender/editors/animation/anim_channels_defines.c b/source/blender/editors/animation/anim_channels_defines.c index 12d14d70602..997b3c22e51 100644 --- a/source/blender/editors/animation/anim_channels_defines.c +++ b/source/blender/editors/animation/anim_channels_defines.c @@ -4152,8 +4152,13 @@ static void achannel_setting_slider_cb(bContext *C, void *id_poin, void *fcu_poi /* insert a keyframe for this F-Curve */ done = insert_keyframe_direct(depsgraph, reports, ptr, prop, fcu, cfra, ts->keyframe_type, nla_context, flag); - if (done) + if (done) { + if (adt->action != NULL) { + DEG_id_tag_update(&adt->action->id, ID_RECALC_ANIMATION_NO_FLUSH); + } + DEG_id_tag_update(id, ID_RECALC_ANIMATION_NO_FLUSH); WM_event_add_notifier(C, NC_ANIMATION | ND_ANIMCHAN | NA_EDITED, NULL); + } } BKE_animsys_free_nla_keyframing_context_cache(&nla_cache); diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 49695da2a17..4cea8ddbf74 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -2126,6 +2126,13 @@ static int insert_key_button_exec(bContext *C, wmOperator *op) } if (success) { + ID *id = ptr.id.data; + AnimData *adt = BKE_animdata_from_id(id); + if (adt->action != NULL) { + DEG_id_tag_update(&adt->action->id, ID_RECALC_ANIMATION_NO_FLUSH); + } + DEG_id_tag_update(id, ID_RECALC_ANIMATION_NO_FLUSH); + /* send updates */ UI_context_update_anim_flag(C); |