diff options
author | Joshua Leung <aligorith@gmail.com> | 2010-01-19 23:30:04 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2010-01-19 23:30:04 +0300 |
commit | a8a5defc0caac44b1fa6fcd330ca8fb262b55547 (patch) | |
tree | 82a0fbf31a068ccffcc9d3ec1e36d5ac087b9e60 /source/blender/editors/animation/anim_ops.c | |
parent | 21004122847fb2570fd61de6677d2b0c8f96444a (diff) |
Preview Range Tweak:
Made preview range be turned on/off using a proper flag instead of just relying on checking for start-frame = 0. It is no longer satisfactory to do that since we can have negative frame numbers, and also having it as a proper flag means that the range can be toggled on/off non-destructively.
Diffstat (limited to 'source/blender/editors/animation/anim_ops.c')
-rw-r--r-- | source/blender/editors/animation/anim_ops.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/animation/anim_ops.c b/source/blender/editors/animation/anim_ops.c index 9544bb70855..82a2b615681 100644 --- a/source/blender/editors/animation/anim_ops.c +++ b/source/blender/editors/animation/anim_ops.c @@ -205,6 +205,7 @@ static int previewrange_define_exec(bContext *C, wmOperator *op) if (efra < 1) efra = 1.0f; if (efra < sfra) efra= sfra; + scene->r.flag |= SCER_PRV_RANGE; scene->r.psfra= (int)floor(sfra + 0.5f); scene->r.pefra= (int)floor(efra + 0.5f); @@ -251,6 +252,7 @@ static int previewrange_clear_exec(bContext *C, wmOperator *op) return OPERATOR_CANCELLED; /* simply clear values */ + scene->r.flag &= ~SCER_PRV_RANGE; scene->r.psfra= 0; scene->r.pefra= 0; |