✏️ fix typo in variable name

This commit is contained in:
Ondřej Samohel 2022-06-21 14:16:00 +02:00
parent 861fbee46c
commit 94af9cdcc9
No known key found for this signature in database
GPG key ID: 02376E18990A97C6

View file

@ -2126,11 +2126,11 @@ def set_scene_resolution(width, height, pixelAspect):
control_node = "defaultResolution"
current_renderer = cmds.getAttr("defaultRenderGlobals.currentRenderer")
aspect_ration_attr = "deviceAspectRatio"
aspect_ratio_attr = "deviceAspectRatio"
# Give VRay a helping hand as it is slightly different from the rest
if current_renderer == "vray":
aspect_ration_attr = "aspectRatio"
aspect_ratio_attr = "aspectRatio"
vray_node = "vraySettings"
if cmds.objExists(vray_node):
control_node = vray_node
@ -2144,7 +2144,7 @@ def set_scene_resolution(width, height, pixelAspect):
deviceAspectRatio = ((float(width) / float(height)) * float(pixelAspect))
cmds.setAttr(
"{}.{}".format(control_node, aspect_ration_attr), deviceAspectRatio)
"{}.{}".format(control_node, aspect_ratio_attr), deviceAspectRatio)
cmds.setAttr("%s.pixelAspect" % control_node, pixelAspect)