![](/img/trans.png)
[英]Same Python command works on one computer but doesn't on another in Maya
[英]Python command for Maya : attributeQuery doesn't work for imagePlane attribute 'colorSpace'
我正在尝试在 Python 中获取可用于 Maya 中给定 imagePlane 的颜色空间选项列表。
我试过了:
print cmds.attributeQuery('colorSpace', n='<nameofImagePlane>', le=True)
但这会返回“none”,这让我感到惊讶,因为它对于其他枚举属性(如“type”、“displayMode”、“textureFilter”等)返回它们的值非常有效。
谁能建议为什么会发生这种情况,或者是否有解决方法或不同的方法来返回给定 imagePlane 的可用颜色空间。
它没有列出任何内容,因为它不是 emum,并且可以通过运行此cmds.attributeQuery("colorSpace", node="imagePlaneShape1", enum=True)
轻松确认。
我想你要的是这个命令: cmds.colorManagementCatalog(listTransformConnections=True, type='input')
您可能不得不弄乱类型参数,但"input"
似乎给出了所有可用颜色空间的正确结果。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.