Blog

See if an object has a specific attribute, Maya, Python

Posted by:

  1. if cmds.objExists(someObject + '.someAttribute'):
  2. print(' the attribute exists')
  3. else:
  4. cmds.addAttr(someObject, longName = 'someAttribute', attributeType = 'float' , minValue = 0, maxValue = 1, defaultValue = 1, keyable = True)
0
  Related Posts

You must be logged in to post a comment.