Select posed cape controls
unknown
plain_text
4 years ago
483 B
6
Indexable
import maya.cmds as mc cape_controls = mc.ls('*_Cape*_Ctrl') cape_dict = {} for i in cape_controls: channel_dict = {} for channel in 'tr': for axis in 'xyz': channel_value = round(mc.getAttr('{}.{}{}'.format(i, channel, axis)), 3) if channel_value: channel_dict['{}{}'.format(channel, axis)] = channel_value if channel_dict: cape_dict[i] = channel_dict print(cape_dict)
Editor is loading...