maya命令 addAttr() 运用。 1 2 3 4 5 6 7 8 importmaya.cmds as cmds cmds.file(new=1,f=1) sphere_xform, sphere_shape=cmds.polySphere(n='Earth') cmds.addAttr(sphere_xform, attributeType='float', shortName='mass', longName='Mass', defaultValue=5.9742e24) print(cmds.getAttr(sphere_...
Python 例 import maya.cmds as cmds cmds.sphere( name='earth' ) # Add an attribute named ms/mass with a default value of 1 and a # minimum value of 0.001 and a maximum of 10000. # cmds.addAttr( shortName='ms', longName='mass', defaultValue=1.0, minValue=0.001, maxValue=10000 )...
command (Python) MEL version addAttr In categories: General , Attributes Go to: Synopsis . Return value . Keywords . Related . Flags . Python examples . Synopsis addAttr([ attributeType = string ], [ binaryTag = stri