在 Maya 中,当使用 setAttr() 命令时,我们可以使用 float 和 double 作为变量类型。有什么区别?文档中的示例是相同的。
-类型浮动3
Array of three floats
Value Syntax float float float
Value Meaning value1 value2 value3
Mel Example setAttr node.float3Attr -type float3 1.1 2.2 3.3;
Python Example cmds.setAttr('node.float3Attr',1.1,2.2,3.3,type='float3')
-类型双3
Array of three doubles
Value Syntax double double double
Value Meaning value1 value2 value3
Mel Example setAttr node.double3Attr -type double3 1.1 2.2 3.3;
Python Example cmds.setAttr('node.double3Attr',1.1,2.2,3.3,type='double3')
http://download.autodesk.com/global/docs/maya2014/en_us/CommandsPython/index.html
谢谢!