splinecraft
3/21/2017 - 5:51 AM

iteration list: gets a list of multipliers from a curve shape

iteration list: gets a list of multipliers from a curve shape

import pymel.core as pm

iterations = 13

def generate_multipliers(n):
    values = []
    loc = pm.spaceLocator(name='gen_loc')
    
    pm.setKeyframe(loc, at='rotateX', time=(1,), v=0, itt='flat', ott='flat')
    pm.setKeyframe(loc, at='rotateX', time=(n+1,), v=1.0, itt='flat', ott='flat')
    
    for frame in xrange(2, n+2):
        v = pm.keyframe(loc, q=True, at='rotateX', eval=True, time=(frame,), vc=True)[0]
        values.append(v)
    
    print(values)
    print(len(values))
    
    pm.delete(loc)
    
generate_multipliers(iterations)