diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-22 21:27:37 +0400 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2012-03-22 21:27:37 +0400 |
commit | 665f784b0670a2008f783a3351b60dddf1edc72d (patch) | |
tree | 8fe3968634235340e506e955824a4b3ab750bbac /source/blender/editors | |
parent | a4ffb69e3aaf53068c9ecd059a8ea4ed2fa39c48 (diff) |
Correction recent start/end range values for frames: it was impossible to set
start frame = end frame which is useful in some cases.
Also made behavior of S/E operators equal to sliders in timeline.
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/space_time/time_ops.c | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c index ef0356d648e..45267563243 100644 --- a/source/blender/editors/space_time/time_ops.c +++ b/source/blender/editors/space_time/time_ops.c @@ -56,17 +56,20 @@ static int time_set_sfra_exec (bContext *C, wmOperator *UNUSED(op)) return OPERATOR_CANCELLED; frame= CFRA; - /* if 'end frame' (Preview Range or Actual) is less than 'frame', - * clamp 'frame' to 'end frame' - */ - if (PEFRA < frame) frame= PEFRA; - + /* if Preview Range is defined, set the 'start' frame for that */ if (PRVRANGEON) scene->r.psfra= frame; else scene->r.sfra= frame; + if (PEFRA < frame) { + if (PRVRANGEON) + scene->r.pefra= frame; + else + scene->r.efra= frame; + } + WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); return OPERATOR_FINISHED; @@ -98,16 +101,18 @@ static int time_set_efra_exec (bContext *C, wmOperator *UNUSED(op)) frame= CFRA; - /* if 'start frame' (Preview Range or Actual) is greater than 'frame', - * clamp 'frame' to 'end frame' - */ - if (PSFRA > frame) frame= PSFRA; - /* if Preview Range is defined, set the 'end' frame for that */ if (PRVRANGEON) scene->r.pefra= frame; else scene->r.efra= frame; + + if (PSFRA > frame) { + if (PRVRANGEON) + scene->r.psfra= frame; + else + scene->r.sfra= frame; + } WM_event_add_notifier(C, NC_SCENE|ND_FRAME, scene); |