diff options
Diffstat (limited to 'source/blender/editors/animation/keyframing.c')
-rw-r--r-- | source/blender/editors/animation/keyframing.c | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/source/blender/editors/animation/keyframing.c b/source/blender/editors/animation/keyframing.c index 4ed5c49c1e3..126e4b5f736 100644 --- a/source/blender/editors/animation/keyframing.c +++ b/source/blender/editors/animation/keyframing.c @@ -1579,9 +1579,6 @@ void ANIM_OT_keyframe_delete(wmOperatorType *ot) static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op)) { - EvaluationContext eval_ctx; - CTX_data_eval_ctx(C, &eval_ctx); - bool changed = false; CTX_DATA_BEGIN (C, Object *, ob, selected_objects) @@ -1598,7 +1595,7 @@ static int clear_anim_v3d_exec(bContext *C, wmOperator *UNUSED(op)) fcn = fcu->next; /* in pose mode, only delete the F-Curve if it belongs to a selected bone */ - if (eval_ctx.object_mode & OB_MODE_POSE) { + if (ob->mode & OB_MODE_POSE) { if ((fcu->rna_path) && strstr(fcu->rna_path, "pose.bones[")) { bPoseChannel *pchan; char *bone_name; @@ -1661,10 +1658,8 @@ void ANIM_OT_keyframe_clear_v3d(wmOperatorType *ot) static int delete_key_v3d_exec(bContext *C, wmOperator *op) { - EvaluationContext eval_ctx; - CTX_data_eval_ctx(C, &eval_ctx); - - const float cfra = eval_ctx.ctime; + Scene *scene = CTX_data_scene(C); + float cfra = (float)CFRA; CTX_DATA_BEGIN (C, Object *, ob, selected_objects) { @@ -1692,7 +1687,7 @@ static int delete_key_v3d_exec(bContext *C, wmOperator *op) /* special exception for bones, as this makes this operator more convenient to use * NOTE: This is only done in pose mode. In object mode, we're dealign with the entire object. */ - if ((eval_ctx.object_mode & OB_MODE_POSE) && strstr(fcu->rna_path, "pose.bones[\"")) { + if ((ob->mode & OB_MODE_POSE) && strstr(fcu->rna_path, "pose.bones[\"")) { bPoseChannel *pchan; char *bone_name; |