Missing prop resolution
parent
06acffd540
commit
73e82b1cad
|
@ -10,6 +10,8 @@ from .. import core
|
|||
|
||||
|
||||
def set_resolution_from_cam_prop(cam=None):
|
||||
rd = bpy.context.scene.render
|
||||
|
||||
if not cam:
|
||||
cam = bpy.context.scene.camera
|
||||
if not cam:
|
||||
|
@ -17,9 +19,9 @@ def set_resolution_from_cam_prop(cam=None):
|
|||
|
||||
res = cam.get('resolution')
|
||||
if not res:
|
||||
return ('ERROR', 'Cam has no resolution attribute')
|
||||
cam['resolution'] = [rd.resolution_x, rd.resolution_y]
|
||||
return ('INFO', 'Cam resolution set from scene')
|
||||
|
||||
rd = bpy.context.scene.render
|
||||
if rd.resolution_x == res[0] and rd.resolution_y == res[1]:
|
||||
return ('INFO', f'Resolution already at {res[0]}x{res[1]}')
|
||||
else:
|
||||
|
|
Loading…
Reference in New Issue