I have this very simple python script in Maya that I want to "animate".
I first want to adapt the end time of the animation to the number of iterations, in order to have enough keyframes for the animation.
After that I want to add a keyframe for the movement of the polyCube at each loop iteration to produce the moving animation.
Code:
import maya.cmds as mc iterations = 10 #number of keyframes transVal = 1 #translation value for each iteration mc.polyCube(constructionHistory=True, width=1, height=1, depth=1) for i in range(iterations): mc.move(transVal, cube, relative=True, moveZ=True) mc.setKeyframe(insert=True, value=i)
Any ideas?
Thanks.