def getNodeAttributes(node):
'''
Get Maya node attributes
'''
attributes = cmds.listAttr(node)
attr = {}
attr['nodeName'] = node
attr['nodeType'] = cmds.nodeType(node)
for attribute in attributes:
if '.' in attribute:
continue
try:
val = cmds.getAttr(node + '.' + attribute)
except RuntimeError:
continue
attr[attribute] = val
return attr
评论列表
文章目录