I posted this on CG Talk hoping to get some feed back. I see some of you geniuses lurking around there from time to time.
I want to create a new spline at every frame from a spline that has both animated transform as well as animated vertices.
I couldn't find a way to detach with copy so I came up with the following.
I want to create a new spline at every frame from a spline that has both animated transform as well as animated vertices.
I couldn't find a way to detach with copy so I came up with the following.
Code:
global ss = $ global ssNum = numknots ss -- number of knots in the selected spline global ssa = #() -- empty array of knot point positions global knotKeys = #() --empty array of the key frames of the animated knots global masterTrack = ss[4][8] --grab the master point controller global knotKeys = masterTrack.keys -- array of the keys of the controller global keyCount = knotKeys.count -- number in the array of the keys of the controller global lastKey =(getkeytime mastertrack.controller keycount).frame as integer --get an integer value for the last key for loops mapped fn getTheKnots = ( (for k in 1 to ssNum do ( append ssa (getKnotPoint ss 1 k) ) ) ) mapped fn makeNewShape = ( for s in 1 to ssNum do ( ns = splineShape() addNewSpline ns addKnot ns 1 #Bezier #Curve (ssa[s]) close ns 1 updateShape ns ) ) for i in 1 to lastKey do ( slidertime = i getTheKnots makeNewShape --ssa =() )