[Bf-blender-cvs] [d724363a395] master: Fix T62908: Missing update when inserting keyframe from dopesheet
Sergey Sharybin
noreply at git.blender.org
Fri Mar 29 10:03:47 CET 2019
Commit: d724363a39564f5d4d4c768f789467c95aacfcdf
Author: Sergey Sharybin
Date: Fri Mar 29 10:01:55 2019 +0100
Branches: master
https://developer.blender.org/rBd724363a39564f5d4d4c768f789467c95aacfcdf
Fix T62908: Missing update when inserting keyframe from dopesheet
===================================================================
M source/blender/editors/animation/anim_channels_defines.c
M source/blender/editors/animation/keyframing.c
===================================================================
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);
More information about the Bf-blender-cvs
mailing list