Fix T64579: Failure to honor anamorphic display
authorRichard Antalik <richardantalik@gmail.com>
Sun, 19 May 2019 18:18:23 +0000 (11:18 -0700)
committerRichard Antalik <richardantalik@gmail.com>
Sun, 19 May 2019 18:55:03 +0000 (11:55 -0700)
Restore stretching of sequencer preview removed in rB005626b8c6b4

Reviewed By: brecht

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

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

index 805ec26..51162c8 100644 (file)
@@ -1121,8 +1121,7 @@ static void sequencer_display_size(Scene *scene, float r_viewrect[2])
   r_viewrect[0] = (float)scene->r.xsch;
   r_viewrect[1] = (float)scene->r.ysch;
 
-  /* Aspect ratio seems to have no effect on output image*/
-  /* r_viewrect[0] *= scene->r.xasp / scene->r.yasp; */
+  r_viewrect[0] *= scene->r.xasp / scene->r.yasp;
 }
 
 static void sequencer_draw_gpencil(const bContext *C)
index e160293..593dd86 100644 (file)
@@ -108,6 +108,8 @@ static void sample_apply(bContext *C, wmOperator *op, const wmEvent *event)
 
   UI_view2d_region_to_view(&ar->v2d, event->mval[0], event->mval[1], &fx, &fy);
 
+  fx /= scene->r.xasp / scene->r.yasp;
+
   fx += (float)scene->r.xsch / 2.0f;
   fy += (float)scene->r.ysch / 2.0f;
   fx *= (float)ibuf->x / (float)scene->r.xsch;