[Bf-blender-cvs] [a872d0b] master: Revert "Fix T39484: Time line: highlighted area for frame range one frame too short."

Bastien Montagne noreply at git.blender.org
Sun Apr 13 12:16:21 CEST 2014


Commit: a872d0b414f406a7d53ce77f7b43e7a831a68fa7
Author: Bastien Montagne
Date:   Sat Apr 12 15:48:49 2014 +0200
https://developer.blender.org/rBa872d0b414f406a7d53ce77f7b43e7a831a68fa7

Revert "Fix T39484: Time line: highlighted area for frame range one frame too short."

This reverts own commit e9d733a8bd9ebf803d4afac419670974792a3c0d.

Turns out there is no consensus here, better to open a design task. :/

===================================================================

M	source/blender/editors/space_time/space_time.c
M	source/blender/editors/space_time/time_ops.c

===================================================================

diff --git a/source/blender/editors/space_time/space_time.c b/source/blender/editors/space_time/space_time.c
index eba4451..51d9840 100644
--- a/source/blender/editors/space_time/space_time.c
+++ b/source/blender/editors/space_time/space_time.c
@@ -67,20 +67,17 @@
 /* ************************ main time area region *********************** */
 
 static void time_draw_sfra_efra(Scene *scene, View2D *v2d)
-{
-	/* Draw darkened area outside of active timeline frame range used is preview range or scene range.
-	 * Note we use STFRA - 0.5 and PEFRA + 0.5, else visible 'active' area is one frame less than what's expected!
+{	
+	/* draw darkened area outside of active timeline 
+	 * frame range used is preview range or scene range 
 	 */
-	const float psfra = ((float)PSFRA) - 0.5f;
-	const float pefra = ((float)PEFRA) + 0.5f;
-
 	glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
 	glEnable(GL_BLEND);
 	glColor4f(0.0f, 0.0f, 0.0f, 0.4f);
-
-	if (psfra < pefra) {
-		glRectf(v2d->cur.xmin, v2d->cur.ymin, psfra, v2d->cur.ymax);
-		glRectf(pefra, v2d->cur.ymin, v2d->cur.xmax, v2d->cur.ymax);
+		
+	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);
@@ -89,8 +86,8 @@ static void time_draw_sfra_efra(Scene *scene, View2D *v2d)
 
 	UI_ThemeColorShade(TH_BACK, -60);
 	/* thin lines where the actual frames are */
-	fdrawline(psfra, v2d->cur.ymin, psfra, v2d->cur.ymax);
-	fdrawline(pefra, v2d->cur.ymin, pefra, v2d->cur.ymax);
+	fdrawline((float)PSFRA, v2d->cur.ymin, (float)PSFRA, v2d->cur.ymax);
+	fdrawline((float)PEFRA, v2d->cur.ymin, (float)PEFRA, v2d->cur.ymax);
 }
 
 #define CACHE_DRAW_HEIGHT   3.0f
diff --git a/source/blender/editors/space_time/time_ops.c b/source/blender/editors/space_time/time_ops.c
index 0de9c29..e2e861f 100644
--- a/source/blender/editors/space_time/time_ops.c
+++ b/source/blender/editors/space_time/time_ops.c
@@ -147,8 +147,8 @@ static int time_view_all_exec(bContext *C, wmOperator *UNUSED(op))
 		return OPERATOR_CANCELLED;
 		
 	/* set extents of view to start/end frames (Preview Range too) */
-	v2d->cur.xmin = ((float)PSFRA) - 0.5f;
-	v2d->cur.xmax = ((float)PEFRA) + 0.5f;
+	v2d->cur.xmin = (float)PSFRA;
+	v2d->cur.xmax = (float)PEFRA;
 	
 	/* we need an extra "buffer" factor on either side so that the endpoints are visible */
 	extra = 0.01f * BLI_rctf_size_x(&v2d->cur);




More information about the Bf-blender-cvs mailing list