24 - 28 Oct
Animation Programming » Devlog
The code below animates a cube moving along the x axis every by using a for loop to increment every 10 in range, when the code is running the cube will move forward
import maya.cmds
Animation_Range = 10
def Create_Cube(increment):
Cube = cmds.polyCube()
cmds.move(increment, x = True)
for i in range(1,101,10):
Create_Cube(i)
cube = cmds.polyCube()
for i in range(Animation_Range):
cmds.currentTime( (i+1)*10, edit=True )
cmds.setKeyframe(cube,v=i, at="translateX")
Animation Programming
More posts
- 17 - 21 Creating ObjectsDec 15, 2022
- 10 - 14 Creating windowDec 15, 2022
- 03 - 07 OctDec 15, 2022
Leave a comment
Log in with itch.io to leave a comment.