mirror of
https://github.com/ynput/ayon-core.git
synced 2025-12-24 21:04:40 +01:00
Preserve image plane size on attaching - fix #411
This commit is contained in:
parent
440e05f308
commit
6a08003ca7
1 changed files with 6 additions and 0 deletions
|
|
@ -299,4 +299,10 @@ def transfer_image_planes(source_cameras, target_cameras,
|
|||
|
||||
def _attach_image_plane(camera, image_plane):
|
||||
cmds.imagePlane(image_plane, edit=True, detach=True)
|
||||
|
||||
# Attaching to a camera resets it to identity size, so we counter that
|
||||
size_x = cmds.getAttr(f"{image_plane}.sizeX")
|
||||
size_y = cmds.getAttr(f"{image_plane}.sizeY")
|
||||
cmds.imagePlane(image_plane, edit=True, camera=camera)
|
||||
cmds.setAttr(f"{image_plane}.sizeX", size_x)
|
||||
cmds.setAttr(f"{image_plane}.sizeY", size_y)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue