Adding a point to a cv curve


#1

Hey, I’m working on a script in python which every time a particle moves it will check if the particle exists based on a previous position if it doesn’t it will create the a curve. And if it does i want it to add a new cv curve point.

Any ideas?

What i’ve got at the moment as an idea/ after reading documentation is;

if curve == True
cmds.insertKnotCurve( ‘curvePoint_’ + str(0), ch=True, p=(particlePosition[0], particlePosition[1], particlePosition[2]), nk=2 )

or

if curveExists == 1:
cmds.curve( ‘curvePoint_’ + str(0), p = [(particlePosition[0], particlePosition[1], particlePosition[2])], a=True)

however they’re not working?

Thanks!