|
Hello
I try to make a script to animate a spline with helper.
So I produce controllers on the knots and the beziers vectors with animatevertex and I create script controller on the knots to link the knots to the helpers and that’s works fine.
After that i want to make a script to add knot on the spline. So I create additional knot with refinesegment (). I update the shape and when i want to move the knots max crashes. Same issue with addknot ().
I’m confuse because when I refine the spline manually everything is ok.
I noticed that when i refine the spline manually the knot number integer is update in the curve editor.
For example if i add a knot between the knot 1 and 2 the vertex 2 is renamed as vertex 3 and if I delete the new knot 2, the vertex 3 is renamed vertex 2 again.
I don’t hunderstand why i can’t do with maxscript what I do with the mouse.
Is there someone who known the same problem and who fixed it?
Is it a maxscript bug? Sometime I get a max.net message error before max crashes.
I think to workaround, i would save the vertex controllers, delete them from the spine, refine the spline et paste the saved controller to the appropriate vertex.
But I don’t know how to delete the controller, if someone could help me…
I’m new to maxscript. Usually i find solutions to my problems in the others topics and i’m very grateful to the community for that. But this time i can’t solve the problem by myself.
Thank you and sorry for my english.
|