Notifications
Clear all

[Closed] weld knots

hello! i have a very simple question:

i created a splineshape (for example a circle) by maxscript. when i make the spline renderable it does look spltted a the start-and endpoint, but these points have the same coordinates. here´s my problem:

i have to weld these points. i can select them by hand and do the script:
splineOps.weld $

but i want to select these points (knots) by script, cause i want to do this maybe a 100 times.
does anbody know how to select 2 or more points of a spline?

thanx

6 Replies

There are more spline menthods in the maxscript help file under SplineShape : Shape

This one is what you want:

setKnotSelection $ 1 #(1)

setKnotSelection <node> <which sub spline> <array of knot numbers>

-Dave

ok thanks, now i can select these points, but i can´t edit them.
i wrote:
setKnotSelection § 1 #[1,36] –1 is the first 36 the last knot
splineOps.weld $

this doesn´t work, i have do do the last command in the subobjectlevel 1, but i don´t know how to adress.

splineOps.weld $ 1 is definitly wrong.

Well, you syntax is wrong in 2 places. The syntax for an array is #(1,36) not #[1,36].

Secondly, § is not $.

Perhaps it was a typing mistake.


setKnotSelection $ 1 #(1,36)
splineOps.weld $

That works for me. Perhaps you’re weld threshold needs to be higher. Try adding a fuse to it:


setKnotSelection $ 1 #(1,36)
splineOps.fuse $
splineOps.weld $

-Dave

setKnotSelection $ 1 #(1,36)
splineOps.fuse $
splineOps.weld $

ok. this seems pretty well. i don´t know why, but it doesn´t work. i make the spline renderable, so i can see, if the connection of the start-and endpoint is right, but when i do the script, i can´t see any difference and the number of vertices stays the same). if i go to the vertex-level of the object by hand (not doing any vertex selection) and run the script now, it works very well. but that is that is not, what i want.
the script does not go down to the vertex level. have i done something wrong?

You need to manually tell it to go to the vertex level:


subobjectLevel = 1

-Dave

thanks a lot! this really helped me!!!