Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoshua Leung <aligorith@gmail.com>2007-03-19 10:32:36 +0300
committerJoshua Leung <aligorith@gmail.com>2007-03-19 10:32:36 +0300
commit8b4b8d4dd21f277ceb71a89b2ea62f7398f33099 (patch)
tree0b2cb6817d8710e84167af36e44258f127ca87bb /source/blender/src/drawtime.c
parent819fc06a80269012dcf920b5dc2f79bf4b417149 (diff)
== Preview Range ==
Preview Range is a useful tool for animating (espcially on longer timelines). It allows you to only run through a limited set of frames to quickly preview the timing of a section of movement without going through the whole timeline. It means you don't have to set/reset start/end frame for rendering everytime you wish to only preview a region of frames. Hi Ton, Attached is a patch (I know you've already got lots of them in the tracker ;-) ) for a feature that I've sometimes wanted. It seems that this sort of thing is supported in other packages, but I can't be sure. Note: I may have left in a few bits and pieces I didn't mean to in the patch (this is off a source tree which had quite a few revisions in it, all of which was experimental) == Preview Range == Preview range is useful for animating (espcially on longer timelines). It allows you to only run through a limited set of frames to quickly preview the timing of a section of movement without going through the whole timeline. It means you don't have to set/reset start/end frame for rendering everytime you wish to only preview a region of frames. * 'Ctrl P' in Action/NLA/Timeline sets preview range. Click+drag to form selection-box defining region of frames to preview * 'Alt P' in Action/NLA/Timeline to clear preview range * 'Pre' button beside Start/End fields in timeline toggles whether start/end fields refer to scene or preview * 'Ctrl Rightarrow' and 'Ctrl Leftarrow' jump to start/end of preview region when it is set * 'S' and 'E' set the start/end frames of preview region when it is set (just like normally) in Timeline only * In Action/NLA editors, frames out of preview region are now drawn darkened when preview-region is set See the following page for more info later: http://wiki.blender.org/index.php/User:Aligorith/Preview_Range
Diffstat (limited to 'source/blender/src/drawtime.c')
-rw-r--r--source/blender/src/drawtime.c38
1 files changed, 30 insertions, 8 deletions
diff --git a/source/blender/src/drawtime.c b/source/blender/src/drawtime.c
index a06541b8665..9b9cba4dc98 100644
--- a/source/blender/src/drawtime.c
+++ b/source/blender/src/drawtime.c
@@ -210,22 +210,42 @@ void draw_markers_timespace()
}
+void draw_anim_preview_timespace()
+{
+ /* only draw this if preview range is set */
+ if (G.scene->r.psfra) {
+ glBlendFunc( GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA );
+ glEnable(GL_BLEND);
+ glColor4f(0, 0, 0, 0.4);
+
+ if (PSFRA < PEFRA) {
+ glRectf(G.v2d->cur.xmin, G.v2d->cur.ymin, PSFRA, G.v2d->cur.ymax);
+ glRectf(PEFRA, G.v2d->cur.ymin, G.v2d->cur.xmax, G.v2d->cur.ymax);
+ }
+ else {
+ glRectf(G.v2d->cur.xmin, G.v2d->cur.ymin, G.v2d->cur.xmax, G.v2d->cur.ymax);
+ }
+
+ glDisable(GL_BLEND);
+ }
+}
+
static void draw_sfra_efra()
{
BIF_ThemeColorShade(TH_BACK, -25);
- if (G.scene->r.sfra < G.scene->r.efra) {
- glRectf(G.v2d->cur.xmin, G.v2d->cur.ymin, G.scene->r.sfra, G.v2d->cur.ymax);
-
- glRectf(G.scene->r.efra, G.v2d->cur.ymin, G.v2d->cur.xmax, G.v2d->cur.ymax);
- } else {
+ if (PSFRA < PEFRA) {
+ glRectf(G.v2d->cur.xmin, G.v2d->cur.ymin, PSFRA, G.v2d->cur.ymax);
+ glRectf(PEFRA, G.v2d->cur.ymin, G.v2d->cur.xmax, G.v2d->cur.ymax);
+ }
+ else {
glRectf(G.v2d->cur.xmin, G.v2d->cur.ymin, G.v2d->cur.xmax, G.v2d->cur.ymax);
}
BIF_ThemeColorShade(TH_BACK, -60);
/* thin lines where the actual frames are */
- fdrawline(G.scene->r.sfra, G.v2d->cur.ymin, G.scene->r.sfra, G.v2d->cur.ymax);
- fdrawline(G.scene->r.efra, G.v2d->cur.ymin, G.scene->r.efra, G.v2d->cur.ymax);
+ fdrawline(PSFRA, G.v2d->cur.ymin, PSFRA, G.v2d->cur.ymax);
+ fdrawline(PEFRA, G.v2d->cur.ymin, PEFRA, G.v2d->cur.ymax);
glDisable(GL_BLEND);
}
@@ -325,7 +345,9 @@ void drawtimespace(ScrArea *sa, void *spacedata)
myortho2(stime->v2d.cur.xmin, stime->v2d.cur.xmax, stime->v2d.cur.ymin, stime->v2d.cur.ymax);
- /* draw darkened area outside of active timeline */
+ /* draw darkened area outside of active timeline
+ * frame range used is preview range or scene range
+ */
draw_sfra_efra();
/* boundbox_seq(); */