Fix T73847 Overlay: Camera orthographic scale moves background image
This commit is contained in:
parent
059f79bdd7
commit
a4cbacacbf
Notes:
blender-bot
2023-10-18 15:23:11 +02:00
Referenced by issue #73847, Changing camera orthographic scale moves background image
|
@ -287,6 +287,9 @@ static void image_camera_background_matrix_get(const Camera *cam,
|
|||
translate[3][0] = bgpic->offset[0];
|
||||
translate[3][1] = bgpic->offset[1];
|
||||
translate[3][2] = cam_corners[0][2];
|
||||
if (cam->type == CAM_ORTHO) {
|
||||
mul_v2_fl(translate[3], cam->ortho_scale);
|
||||
}
|
||||
/* These lines are for keeping 2.80 behavior and could be removed to keep 2.79 behavior. */
|
||||
translate[3][0] *= min_ff(1.0f, cam_aspect);
|
||||
translate[3][1] /= max_ff(1.0f, cam_aspect) * (image_aspect / cam_aspect);
|
||||
|
|
Loading…
Reference in New Issue