diff options
author | Joshua Leung <aligorith@gmail.com> | 2009-07-07 10:56:29 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2009-07-07 10:56:29 +0400 |
commit | 761241fcbbeb254cd78aca5f8bb62330ce9369ac (patch) | |
tree | 232414e27d3a0ec06d97bdb7ef49508ac9cf27ca /source/blender/editors/animation | |
parent | dd42ad590ed4a620b0c70eb844d0cf341014b290 (diff) |
NLA SoC: Current Frame can now be negative
This commit is quite experimental, and might have to be reverted, but in quite a few places, the cleanups from this commit were already necessary.
* I've left most of the image-handling functions alone, since I'm not sure how well they cope with negative indices.
* Start/End frames cannot be negative for now... any specific reasons why they should be negative?
Diffstat (limited to 'source/blender/editors/animation')
-rw-r--r-- | source/blender/editors/animation/anim_ops.c | 8 |
1 files changed, 5 insertions, 3 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 ****************************/ |