Advertisement
Guest User

Untitled

a guest
Nov 18th, 2019
112
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. def standin_timeNode():
  2. import maya.cmds as cmds
  3. timeNode = cmds.ls(type='time')
  4. standinList = cmds.ls(sl=True, dag=True, ap=True, type='aiStandIn')
  5. print standinList
  6.  
  7. for i in standinList:
  8. print i
  9. try:
  10. # standinShape = cmds.listRelatives(i, type='aiStandIn')
  11. cmds.setAttr(i + '.useFrameExtension', 0)
  12. x = cmds.listConnections(i, type='expression')
  13. cmds.delete(x)
  14. cmds.connectAttr(timeNode[0] + '.outTime', i + '.frameNumber', f = True)
  15. cmds.setAttr(i + '.useFrameExtension', 1)
  16. except RuntimeError as e:
  17. print " Could not connect Attributes "
  18.  
  19. standin_timeNode()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement