mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T73847 Overlay: Camera orthographic scale moves background image
This commit is contained in:
parent
059f79bdd7
commit
a4cbacacbf
1 changed files with 3 additions and 0 deletions
|
|
@ -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…
Add table
Add a link
Reference in a new issue