Page MenuHome

torture-lib.py

File Metadata

Author
Robert Forsman (mutantbob)
Created
May 30 2014, 5:00 PM

torture-lib.py

def keyframeFor(t, idx):
phase = t%3
bt = obj.keyframe_insert(data_path="location", index=idx, frame=t*10)[0]
bt.handle_right_type = 'FREE'
bt.handle_left_type = 'FREE'
if 1==phase:
bt.co.y = 0.2+idx*2
# bt.handle_right =(bt.co.x+5, bt.co.y+1)
bt.interpolation = 'BEZIER'
bt.handle_right =(bt.co.x+2, 0.5+idx*2)
print (bt.handle_right)
elif 2==phase:
bt.co.y = 1+idx*2
bt.interpolation = 'LINEAR'
bt.handle_left = (bt.co.x-2, bt.co.y)
else:
bt.co.y = idx*2
bt.interpolation = 'CONSTANT'

Event Timeline