[Bf-blender-cvs] [51c6eca] master: Fix T38004: size of Waveform, Vectorscope and Histogram is incorrect in VSE

Sergey Sharybin noreply at git.blender.org
Thu Jan 2 13:00:27 CET 2014


Commit: 51c6ecac523845e4aeba4cde7298bb2116564724
Author: Sergey Sharybin
Date:   Thu Jan 2 17:57:01 2014 +0600
https://developer.blender.org/rB51c6ecac523845e4aeba4cde7298bb2116564724

Fix T38004: size of Waveform, Vectorscope and Histogram is incorrect in VSE

Made it so scopes image buffer is displayed without any additional scale
applied on them,

Further tweaks are possible here, but that i'd consider a TODO.

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

M	source/blender/editors/space_sequencer/sequencer_draw.c

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

diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index c6aec21..a51fd49 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -965,12 +965,6 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
 		glClear(GL_COLOR_BUFFER_BIT);
 	}
 
-	/* without this colors can flicker from previous opengl state */
-	glColor4ub(255, 255, 255, 255);
-
-	UI_view2d_totRect_set(v2d, viewrectx + 0.5f, viewrecty + 0.5f);
-	UI_view2d_curRect_validate(v2d);
-
 	/* only initialize the preview if a render is in progress */
 	if (G.is_rendering)
 		return;
@@ -1027,8 +1021,16 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
 		}
 
 		scopes->reference_ibuf = ibuf;
+		viewrectx = scope->x;
+		viewrecty = scope->y;
 	}
 
+	/* without this colors can flicker from previous opengl state */
+	glColor4ub(255, 255, 255, 255);
+
+	UI_view2d_totRect_set(v2d, viewrectx + 0.5f, viewrecty + 0.5f);
+	UI_view2d_curRect_validate(v2d);
+
 	/* setting up the view - actual drawing starts here */
 	UI_view2d_view_ortho(v2d);




More information about the Bf-blender-cvs mailing list