Maya文件节点查询颜色space
Maya file node query color space
有没有办法在maya中查询纹理文件节点颜色space?即raw、sRGB等。我知道怎么写,但不会查询。
您可以使用 listConnections
获取连接到您的 material 的纹理文件列表,然后只需使用 getAttr
查询它:
# Example of having a texture file on a Blinn's color property.
texture_files = cmds.listConnections("blinn1.color", type="file")
if texture_files:
print cmds.getAttr("{}.colorSpace".format(texture_files[0]))
# Result: sRGB
有没有办法在maya中查询纹理文件节点颜色space?即raw、sRGB等。我知道怎么写,但不会查询。
您可以使用 listConnections
获取连接到您的 material 的纹理文件列表,然后只需使用 getAttr
查询它:
# Example of having a texture file on a Blinn's color property.
texture_files = cmds.listConnections("blinn1.color", type="file")
if texture_files:
print cmds.getAttr("{}.colorSpace".format(texture_files[0]))
# Result: sRGB