[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [29283] trunk/blender/source/blender/ editors/space_sequencer/sequencer_draw.c: == Sequencer ==
Peter Schlaile
peter at schlaile.de
Sun Jun 6 22:19:22 CEST 2010
Revision: 29283
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=29283
Author: schlaile
Date: 2010-06-06 22:19:22 +0200 (Sun, 06 Jun 2010)
Log Message:
-----------
== Sequencer ==
Applied: [#22490] Add Passepartout to Sequence Editor for frame ranges
Thanks to Keith Boshoff (wahooney) for the patch!
Modified Paths:
--------------
trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
Modified: trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c
===================================================================
--- trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c 2010-06-06 20:00:44 UTC (rev 29282)
+++ trunk/blender/source/blender/editors/space_sequencer/sequencer_draw.c 2010-06-06 20:19:22 UTC (rev 29283)
@@ -932,6 +932,33 @@
draw_seq_strip(scene, ar, sseq, last_seq, 120, pixelx);
}
+static void seq_draw_sfra_efra(const bContext *C, SpaceSeq *sseq, ARegion *ar)
+{
+ View2D *v2d= UI_view2d_fromcontext(C);
+ Scene *scene= CTX_data_scene(C);
+
+ glEnable(GL_BLEND);
+
+ /* draw darkened area outside of active timeline
+ * frame range used is preview range or scene range */
+ UI_ThemeColorShadeAlpha(TH_BACK, -25, -100);
+
+ if (PSFRA < PEFRA) {
+ glRectf(v2d->cur.xmin, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
+ glRectf((float)PEFRA, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ }
+ else {
+ glRectf(v2d->cur.xmin, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+ }
+
+ UI_ThemeColorShade(TH_BACK, -60);
+ /* thin lines where the actual frames are */
+ fdrawline((float)PSFRA, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
+ fdrawline((float)PEFRA, v2d->cur.ymin, (float)PEFRA, v2d->cur.ymax);
+
+ glDisable(GL_BLEND);
+}
+
/* Draw Timeline/Strip Editor Mode for Sequencer */
void draw_timeline_seq(const bContext *C, ARegion *ar)
{
@@ -965,8 +992,9 @@
/* regular grid-pattern over the rest of the view (i.e. frame grid lines) */
UI_view2d_constant_grid_draw(C, v2d);
-
+ seq_draw_sfra_efra(C, sseq, ar);
+
/* sequence strips (if there is data available to be drawn) */
if (ed) {
/* draw the data */
More information about the Bf-blender-cvs
mailing list