Last active
November 7, 2017 16:58
-
-
Save n1ckfg/4125814 to your computer and use it in GitHub Desktop.
Turn object sequence on and off in Maya
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from maya.cmds import * | |
numObjs = 19 | |
objPrefix = "vectorsquid" | |
objSuffix = ":polySurface1" | |
t = 0 | |
tDelta = 5 | |
for i in range(numObjs): | |
currentTime(t) | |
for j in range(numObjs): | |
temp = objPrefix + str(j+1) + objSuffix | |
setAttr(temp + ".visibility",0) | |
setKeyframe(temp + ".v") | |
temp = "vectorsquid" + str(i+1) + objSuffix | |
setAttr(temp + ".visibility",1) | |
setKeyframe(temp + ".v") | |
t += tDelta |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment