Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def time_connect(name):
- " This is to connect standin seq to time node instead of expression "
- import maya.cmds as cmds
- timeNode = cmds.ls(type='time')
- standinList = cmds.ls(name, dag=True, type='aiStandIn')
- print standinList
- for i in standinList:
- print i
- try:
- # standinShape = cmds.listRelatives(i, type='aiStandIn')
- cmds.setAttr(i + '.useFrameExtension', 0)
- x = cmds.listConnections(i, type='expression')
- cmds.delete(x)
- cmds.connectAttr(timeNode[0] + '.outTime', i + '.frameNumber', f=True)
- cmds.setAttr(i + '.useFrameExtension', 1)
- except RuntimeError as e:
- print " Could not connect Attributes "
- time_connect()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement