[Closed] break multiple splines
quick scripting question:
I need a script that will select the first vertex of every spline selected and breaks it.
I need to break ~400 splines, but explode will not suffice as I need them otherwise to be intact if you get me.
If I use the maxscript listener to get to selecte vertex with id 1, it only records “subobjectlevel = 1” but not the selecting and the braking below that.
Any ideas?
Hi,
I don’t know what i’m talking about.
but in my mind i could see it done by making the splines in the script and putting them into an array and selecting the verts by their id, b/c if you know how many knots are created from each spline you could do it.
are you trying to make the splines with the script as well? or are you planning to create the splines then try to run a script?
The splines are already there. roughly 400 closed splines.
the script should just select the first vertex of every spline and hit the “break” button.
fn BreakClosedSpline shpe spl = if isClosed shpe spl do
(
nseg = numSegments shpe spl;
refineSegment shpe spl nseg 1.0;
open shpe spl;
)
fn ForAllSplinesInShape shpe fnct = if classof shpe == SplineShape do
(
num_splines = numSplines shpe;
for i = 1 to num_splines do fnct shpe i;
updateShape shpe;
)
for s in shapes do ForAllSplinesInShape s BreakClosedSpline;