forked from lookbothways/vfxTools
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathsetRenderSettings_pythonEdition
More file actions
28 lines (22 loc) · 980 Bytes
/
Copy pathsetRenderSettings_pythonEdition
File metadata and controls
28 lines (22 loc) · 980 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#Rendersettings
import maya.cmds as cmds
""" Improvements to make
Get show from SG
Get Show's res + FPS from SG
"""
def setRenderSettings():
print "Executing render settings..."
widthRes= float(3840)
heightRes= float(1606)
devAspc=float(widthRes/heightRes)
cmds.setAttr("defaultResolution.aspectLock",False)
cmds.setAttr("defaultResolution.deviceAspectRatio",float(devAspc))
cmds.setAttr("defaultResolution.pixelAspect",1)
aspect = cmds.getAttr ("defaultResolution.pixelAspect")
cmds.setAttr("defaultResolution.width", int(widthRes))
cmds.setAttr("defaultResolution.height", int(heightRes))
aspectLock = cmds.setAttr("defaultResolution.aspectLock",True)
fps = cmds.currentUnit(t='pal')
cmds.setAttr ("defaultRenderGlobals.imageFilePrefix","<Scene>/<RenderLayer>/<Scene>.<RenderLayer>.<RenderPass>",type="string")
output = "Render settings applied for CUR: width {} height {} | aspect {} | fps {} ".format(widthRes, heightRes, aspect, fps )
print output,