diff options
Diffstat (limited to 'source/blender/editors/interface/interface_anim.c')
-rw-r--r-- | source/blender/editors/interface/interface_anim.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/source/blender/editors/interface/interface_anim.c b/source/blender/editors/interface/interface_anim.c index 812f4ef0747..95a0f8704fa 100644 --- a/source/blender/editors/interface/interface_anim.c +++ b/source/blender/editors/interface/interface_anim.c @@ -43,6 +43,7 @@ #include "BKE_global.h" #include "BKE_nla.h" +#include "DEG_depsgraph.h" #include "DEG_depsgraph_build.h" #include "ED_keyframing.h" @@ -239,10 +240,11 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) if (special) { /* NLA Strip property */ if (IS_AUTOKEY_ON(scene)) { + Depsgraph *depsgraph = CTX_data_depsgraph(C); ReportList *reports = CTX_wm_reports(C); ToolSettings *ts = scene->toolsettings; - insert_keyframe_direct(reports, but->rnapoin, but->rnaprop, fcu, cfra, ts->keyframe_type, 0); + insert_keyframe_direct(depsgraph, reports, but->rnapoin, but->rnaprop, fcu, cfra, ts->keyframe_type, 0); WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); } } @@ -251,10 +253,11 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) * making it easier to set up corrective drivers */ if (IS_AUTOKEY_ON(scene)) { + Depsgraph *depsgraph = CTX_data_depsgraph(C); ReportList *reports = CTX_wm_reports(C); ToolSettings *ts = scene->toolsettings; - insert_keyframe_direct(reports, but->rnapoin, but->rnaprop, fcu, cfra, ts->keyframe_type, INSERTKEY_DRIVER); + insert_keyframe_direct(depsgraph, reports, but->rnapoin, but->rnaprop, fcu, cfra, ts->keyframe_type, INSERTKEY_DRIVER); WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); } } @@ -263,6 +266,7 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) /* TODO: this should probably respect the keyingset only option for anim */ if (autokeyframe_cfra_can_key(scene, id)) { + Depsgraph *depsgraph = CTX_data_depsgraph(C); ReportList *reports = CTX_wm_reports(C); ToolSettings *ts = scene->toolsettings; short flag = ANIM_get_keyframing_flags(scene, 1); @@ -273,7 +277,8 @@ void ui_but_anim_autokey(bContext *C, uiBut *but, Scene *scene, float cfra) * because a button may control all items of an array at once. * E.g., color wheels (see T42567). */ BLI_assert((fcu->array_index == but->rnaindex) || (but->rnaindex == -1)); - insert_keyframe(reports, id, action, ((fcu->grp) ? (fcu->grp->name) : (NULL)), + insert_keyframe(depsgraph, reports, id, action, + ((fcu->grp) ? (fcu->grp->name) : (NULL)), fcu->rna_path, but->rnaindex, cfra, ts->keyframe_type, flag); WM_event_add_notifier(C, NC_ANIMATION | ND_KEYFRAME | NA_EDITED, NULL); |