在Maya Render Settings中使用Python设置属性(Common Tab/Mental Ray)?

Use Python to Set Attributes in Maya Render Settings (Common Tab/Mental Ray)?

我正在尝试使用 python 在 Maya 中设置预定义的渲染设置。在渲染设置 window 中有选项卡,第一个选项卡称为 "Common",其中包括 "Color Management" 和 "File Output" 等内容。

在 mental ray 特定选项卡中,例如 "Quality" 我可以使用类似的东西轻松更改设置

cmds.setAttr('miDefaultOptions.maxRefractionRays', 3)
cmds.setAttr('miDefaultOptions.maxShadowRayDepth', 2)
cmds.setAttr('miDefaultOptions.miSamplesMax', 2)

但是,我无法为 "Common" 选项卡执行此操作。

有谁知道 Python 中是否有设置此功能的方法?专为 Common>"Color Management".

谢谢!

您需要使用 defaultRenderGlobals、defaultResolution 并使用 listAttr 来查看属性。您需要根据您的颜色配置文件设置 defaultRenderGlobals.outputColorProfle 或 inputColorProfile。