[Bf-blender-cvs] [2239dca7e93] master: Sequencer: Viewport Rendering Annotation

Jeroen Bakker noreply at git.blender.org
Thu Jun 6 17:15:51 CEST 2019


Commit: 2239dca7e9359ad0b1b8abe5fbbdefaeb85b480f
Author: Jeroen Bakker
Date:   Thu Jun 6 14:41:54 2019 +0200
Branches: master
https://developer.blender.org/rB2239dca7e9359ad0b1b8abe5fbbdefaeb85b480f

Sequencer: Viewport Rendering Annotation

When rendering the Sequencer using viewport rendering the annotations
were not scaled to respect the scene render size. This was because the
matrices were calculated based on the output size and not the actual
rendersize.

Reviewed By: brecht

Differential Revision: https://developer.blender.org/D5032

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

M	source/blender/editors/render/render_opengl.c

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

diff --git a/source/blender/editors/render/render_opengl.c b/source/blender/editors/render/render_opengl.c
index 20229b63258..845f60e9ad1 100644
--- a/source/blender/editors/render/render_opengl.c
+++ b/source/blender/editors/render/render_opengl.c
@@ -330,8 +330,8 @@ static void screen_opengl_render_doit(const bContext *C, OGLRender *oglrender, R
       GPU_clear_color(0.0f, 0.0f, 0.0f, 0.0f);
       GPU_clear(GPU_COLOR_BIT | GPU_DEPTH_BIT);
 
-      wmOrtho2(0, sizex, 0, sizey);
-      GPU_matrix_translate_2f(sizex / 2, sizey / 2);
+      wmOrtho2(0, scene->r.xsch, 0, scene->r.ysch);
+      GPU_matrix_translate_2f(scene->r.xsch / 2, scene->r.ysch / 2);
 
       G.f |= G_FLAG_RENDER_VIEWPORT;
       ED_annotation_draw_ex(scene, gpd, sizex, sizey, scene->r.cfra, SPACE_SEQ);



More information about the Bf-blender-cvs mailing list