Deleted isoloted vertices

Hi,

I'm after a script that can select delete isolated vertices and center pivot point on editpoly and editmesh ( but not lofts, sweeps and objects with modifiers on them)

I have models coming from Archicad exported with the lumion exporter, theres isolated vertices all over the place, making the scene hard to handle.
Selecting all of the models and applying edtipoly or editmesh takes 3dsmax a long time, selecting isolated vertices, hitting delete and centering pivot point.
So i have to do it in batches, but a script would be very handy :)

Comments

Comment viewing options

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

So do I have to put the every

So do I have to put the every objects name in for it to work ?
Is there way it can automatically search the scene for editpoly editmesh run the deleted isolated vertices, center pivot and reset xform ?
Oh the xform is new, I tried to use the listener to see the log command for it and it didn't show up.

Spacelord's picture

thanks that works on selected

thanks that works on selected objects, is there anyway to make it so it works on objects in the scene that aren't selected ?

thanks

miauu's picture

.

In the code below fill the objsToAffectArr with the objects that you want to manipulate. There is no need those objects to be selected.

(
	--	"the variable below must containt the objects that you want to be affceted by the script"
	objsToAffectArr = #()
 
	for obj in objsToAffectArr do
	(
		if classOf obj == editable_mesh then
		(
			meshop.deleteIsoVerts obj
		)
		else 
		(
			if classOf obj == editable_poly do
				obj.EditablePoly.deleteIsoVerts () 
		)
	)
)
vusta's picture

i would say that's a piece of cake for the maxscript experts

which I am not...I think it's just a 'collect' superclass geometry then apply the same logic...I wouldn't be able to provide an elegant and robust solution as a real expert...so wait for them..shouldn't be too long...come on all you gurus...

in the mean time here's my amateurish attempt:
(so basically it's just an extra collect step at the start)

select(for geo in geometry collect geo)

for obj in (selection as array) do

( if classOf obj == editable_mesh then

meshop.deleteIsoVerts obj

else if classOf obj == editable_poly then

obj.EditablePoly.deleteIsoVerts () )

Spacelord's picture

delete isolated vertices

So do I have to put the every objects name in for it to work ?
Is there way it can automatically search the scene for editpoly editmesh run the deleted isolated vertices, center pivot and reset xform ?
Oh the xform is new, I tried to use the listener to see the log command for it and it didn't show up.

vusta's picture

what about this...

objsToAffectArr = for geo in geometry collect geo

(nothing about centering/reset Xform tho...)

Comment viewing options

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