diff options
Diffstat (limited to 'source/blender/editors')
6 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index e899cc1d520..10691c558bf 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -83,10 +83,12 @@ static void change_frame_apply(bContext *C, wmOperator *op) Scene *scene= CTX_data_scene(C); int cfra; - /* get frame, and clamp to MINFRAME */ + /* get frame, and clamp to MINAFRAME + * - not MINFRAME, since it's useful to be able to key a few-frames back + */ cfra= RNA_int_get(op->ptr, "frame"); - if (cfra < MINFRAME) cfra= MINFRAME; + if (cfra < MINAFRAME) cfra= MINAFRAME; CFRA= cfra; WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); @@ -209,7 +211,7 @@ void ANIM_OT_change_frame(wmOperatorType *ot) ot->modal= change_frame_modal; /* rna */ - RNA_def_int(ot->srna, "frame", 0, 1, MAXFRAME, "Frame", "", 1, MAXFRAME); + RNA_def_int(ot->srna, "frame", 0, MINAFRAME, MAXFRAME, "Frame", "", MINAFRAME, MAXFRAME); } /* ****************** set preview range operator ****************************/ diff --git a/source/blender/editors/space_action/action_select.c b/source/blender/editors/space_action/action_select.c index d45e32dd3bb..5b87c04b311 100644 --- a/source/blender/editors/space_action/action_select.c +++ b/source/blender/editors/space_action/action_select.c @@ -642,7 +642,7 @@ static void actkeys_mselect_leftright (bAnimContext *ac, short leftright, short memset(&bed, 0, sizeof(BeztEditFunc)); if (leftright == ACTKEYS_LRSEL_LEFT) { - bed.f1 = -MAXFRAMEF; + bed.f1 = MINAFRAMEF; bed.f2 = (float)(CFRA + FRAME_CLICK_THRESH); } else { diff --git a/source/blender/editors/space_buttons/buttons_header.c b/source/blender/editors/space_buttons/buttons_header.c index 7c622f172a2..99cc85d9a52 100644 --- a/source/blender/editors/space_buttons/buttons_header.c +++ b/source/blender/editors/space_buttons/buttons_header.c @@ -193,7 +193,7 @@ void buttons_header_buttons(const bContext *C, ARegion *ar) uiBlockEndAlign(block); xco+=XIC; - uiDefButI(block, NUM, B_NEWFRAME, "", (xco+20),yco,60,YIC, &(CTX_data_scene(C)->r.cfra), 1.0, MAXFRAMEF, 0, 0, "Displays Current Frame of animation. Click to change."); + uiDefButI(block, NUM, B_NEWFRAME, "", (xco+20),yco,60,YIC, &(CTX_data_scene(C)->r.cfra), MINAFRAMEF, MAXFRAMEF, 0, 0, "Displays Current Frame of animation. Click to change."); xco+= 80; /* always as last */ diff --git a/source/blender/editors/space_graph/graph_select.c b/source/blender/editors/space_graph/graph_select.c index 11af86ca83b..c855222df02 100644 --- a/source/blender/editors/space_graph/graph_select.c +++ b/source/blender/editors/space_graph/graph_select.c @@ -763,7 +763,7 @@ static void graphkeys_mselect_leftright (bAnimContext *ac, short leftright, shor memset(&bed, 0, sizeof(BeztEditFunc)); if (leftright == GRAPHKEYS_LRSEL_LEFT) { - bed.f1 = -MAXFRAMEF; + bed.f1 = MINAFRAMEF; bed.f2 = (float)(CFRA + 0.1f); } else { diff --git a/source/blender/editors/space_nla/nla_select.c b/source/blender/editors/space_nla/nla_select.c index ca186dcf702..895d0dbf88a 100644 --- a/source/blender/editors/space_nla/nla_select.c +++ b/source/blender/editors/space_nla/nla_select.c @@ -501,7 +501,7 @@ static void nlaedit_mselect_leftright (bContext *C, bAnimContext *ac, short left /* get range, and get the right flag-setting mode */ if (leftright == NLAEDIT_LRSEL_LEFT) { - xmin = -MAXFRAMEF; + xmin = MINAFRAMEF; xmax = (float)(CFRA + FRAME_CLICK_THRESH); } else { diff --git a/source/blender/editors/space_time/time_header.c b/source/blender/editors/space_time/time_header.c index 29f31671670..da99849e594 100644 --- a/source/blender/editors/space_time/time_header.c +++ b/source/blender/editors/space_time/time_header.c @@ -536,9 +536,12 @@ void time_header_buttons(const bContext *C, ARegion *ar) xco += (short)(4.5 * XIC + 16); + /* MINAFRAMEF not MINFRAMEF, since MINAFRAMEF allows to set current frame negative + * to facilitate easier keyframing in some situations + */ uiDefButI(block, NUM, B_NEWFRAME, "", xco,yco, (int)3.5*XIC,YIC, - &(scene->r.cfra), MINFRAMEF, MAXFRAMEF, 0, 0, + &(scene->r.cfra), MINAFRAMEF, MAXFRAMEF, 0, 0, "Displays Current Frame of animation"); xco += (short)(3.5 * XIC + 16); |