Removes 2 verticles splines from the multuiple EditableSpline objects
here is have script which do the job to remove 2-vertices splines from the Editable Spline objects, however I'm failed to make it work on multiple EditableSpline objects selected please help
<code>
fn deleteSplinesWithTwoVerts obj =
(
if classof obj == Editable_Spline or isKindOf obj SplineShape then
(
subObjectLevel = 1 -- switch to spline sub-object level
for i = obj.numSplines to 1 by -1 do -- Iterate through splines from last to first to avoid reindexing issues when deleting
(
if (numKnots obj i) == 2 then
deleteSpline obj i
)
subObjectLevel = 0 -- reset to object level
)
else
(
messageBox "Please select an EditableSpline object."
)
)
-- Execute function
deleteSplinesWithTwoVerts selection[1]
</code>
Comments
.
Tools and Scripts for Autodesk 3dsMax