open/break ~400 splines

Hi there,

this should be a really simple script. But I can't fathom out how to do this:
I need to open up a couple of hundred splines. They are all closed but I need them now to be open. I use them as a spline for forest pack. Exploding them will not bring the right result. They need to stay intact, but need to be open.

I was thinking of selecting every first vertex of every spline and braking that.
However I don't know how to select the vertex by number nor what the break function is. MaxScript recorder will only show me the subObjectlevel = 1 but not what happens after that.

Any help is much appreciated

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
miauu's picture

.

For some reason ths code below will open only the last spline in the selection.
TRy to fix it. :)

(
	splinesArr = for s in selection where classOf s == SplineShape or classOf s == Line collect s
	for s in 	splinesArr do
	(
		select s
		max modify mode
		splineNum = numSplines s
		if splineNum > 0 do
		(
			for n = 1 to splineNum do
			(
				subobjectlevel = 1
				setKnotSelection s n #(1) keep:true
			)
			splineOps.startBreak s
			updateShape s
		)
	)
)

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.