Untitled
unknown
python
10 months ago
568 B
5
Indexable
import maya.cmds as cmds
import math
animationStart = 0
animationEnd = 120
flapFrames = 10
flapAmplitude = 10.0
flapSpeed = 3.0
newWingsFlap = 0.0
j=0
for i in range(animationStart, animationEnd+1, flapFrames):
timeFraction = (animationEnd-animationStart)/flapFrames
teta = j*(2*math.pi/timeFraction)
j+=1
newWingsFlap = flapAmplitude * math.fabs(math.sin(flapSpeed*teta))
cmds.setAttr('ButterWings_MASTER.Both_WingsFlap', newWingsFlap)
cmds.setKeyframe( 'ButterWings_MASTER', attribute='Both_WingsFlap', t=i)Editor is loading...
Leave a Comment