yaotungyu

dyn on off enum read

May 5th, 2021
843
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. on_off_attr = 'Hattie_01:C_HairDynamics_Main_Ctrl.DynamicsOnOff'
  2. on_off_dict = {}
  3. cmds.setAttr(on_off_attr,1)
  4. on_off_dict[cmds.getAttr(on_off_attr,asString=1)] = cmds.getAttr(on_off_attr)
  5. cmds.setAttr(on_off_attr,0)
  6. on_off_dict[cmds.getAttr(on_off_attr,asString=1)] = cmds.getAttr(on_off_attr)
  7. # Result: {u'Off': 1, u'On': 0} #
  8.  
RAW Paste Data