[Bf-blender-cvs] [79c17aa] gooseberry: Support metadata display in sequencer overdrop

Antony Riakiotakis noreply at git.blender.org
Wed May 6 16:07:01 CEST 2015


Commit: 79c17aaad844fa9a8f740036ed11e512a9eaefb7
Author: Antony Riakiotakis
Date:   Wed May 6 16:06:43 2015 +0200
Branches: gooseberry
https://developer.blender.org/rB79c17aaad844fa9a8f740036ed11e512a9eaefb7

Support metadata display in sequencer overdrop

Getting a consistent look here is difficult since editors apply their
own scaling. ideally, here we would have a consistent look with constant
font size but this is still to be realized in master and needs some
extra thought.

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

M	release/scripts/startup/bl_ui/space_sequencer.py
M	source/blender/editors/screen/area.c
M	source/blender/editors/space_sequencer/sequencer_draw.c

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

diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index 3b9269a..7c18932 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -206,11 +206,12 @@ class SEQUENCER_MT_view(Menu):
 
         if is_preview:
             if st.display_mode == 'IMAGE':
-                layout.prop(st, "show_safe_areas")
                 layout.prop(st, "show_metadata")
             elif st.display_mode == 'WAVEFORM':
                 layout.prop(st, "show_separate_color")
 
+        layout.prop(st, "show_metadata")
+
         layout.separator()
 
         if is_sequencer_view:
diff --git a/source/blender/editors/screen/area.c b/source/blender/editors/screen/area.c
index 0160660..e492696 100644
--- a/source/blender/editors/screen/area.c
+++ b/source/blender/editors/screen/area.c
@@ -2310,7 +2310,7 @@ void ED_region_image_metadata_draw(int x, int y, ImBuf *ibuf, rctf frame, float
 	glTranslatef(x, y, 0.0f);
 	glScalef(zoomx, zoomy, 1.0f);
 
-	BLF_size(blf_mono_font, style->widgetlabel.points * 1.5f, U.dpi);
+	BLF_size(blf_mono_font, style->widgetlabel.points, U.dpi);
 
 	/* *** upper box*** */
 
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 113a6af..290f05a 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -1089,6 +1089,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
 	const bool draw_gpencil = ((sseq->flag & SEQ_SHOW_GPENCIL) && sseq->gpd);
 	const char *names[2] = {STEREO_LEFT_NAME, STEREO_RIGHT_NAME};
 	bool draw_metadata = false;
+	rctf metadataframe;
 
 	if (G.is_rendering == false && (scene->r.seq_flag & R_SEQ_GL_PREV) == 0) {
 		/* stop all running jobs, except screen one. currently previews frustrate Render
@@ -1341,7 +1342,11 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
 		float imagey = (scene->r.size * scene->r.ysch) / 200.0f * sseq->overdrop_zoom;
 		float xofs = BLI_rcti_size_x(&ar->winrct)/2.0f + sseq->overdrop_offset[0];
 		float yofs = BLI_rcti_size_y(&ar->winrct)/2.0f + sseq->overdrop_offset[1];
-		
+
+		draw_metadata = ((sseq->flag & SEQ_SHOW_METADATA) != 0);
+
+		BLI_rctf_init(&metadataframe, -imagex + xofs, imagex + xofs, -imagey + yofs, imagey + yofs);
+
 		glTexCoord2f(0.0f, 0.0f); glVertex2f(-imagex + xofs, -imagey + yofs);
 		glTexCoord2f(0.0f, 1.0f); glVertex2f(-imagex + xofs, imagey + yofs);
 		glTexCoord2f(1.0f, 1.0f); glVertex2f(imagex + xofs, imagey + yofs);
@@ -1350,6 +1355,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
 	else {
 		draw_metadata = ((sseq->flag & SEQ_SHOW_METADATA) != 0);
 
+		metadataframe = v2d->tot;
 		glTexCoord2f(0.0f, 0.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymin);
 		glTexCoord2f(0.0f, 1.0f); glVertex2f(v2d->tot.xmin, v2d->tot.ymax);
 		glTexCoord2f(1.0f, 1.0f); glVertex2f(v2d->tot.xmax, v2d->tot.ymax);
@@ -1373,7 +1379,7 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
 		IMB_freeImBuf(ibuf);
 
 	if (draw_metadata) {
-		ED_region_image_metadata_draw(0.0, 0.0, ibuf, v2d->tot, 1.0, 1.0);
+		ED_region_image_metadata_draw(0.0, 0.0, ibuf, metadataframe, 1.0, 1.0);
 	}
 
 	if (draw_overdrop) {




More information about the Bf-blender-cvs mailing list