ScriptSpot

Forum topic · Scripts Wanted

Deleted isoloted vertices

By Spacelord · 2016-12-13

Description

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 (7)

Spacelord · 2016-12-23

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 · 2016-12-15

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

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

vusta · 2016-12-15

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 () )

.

miauu · 2016-12-15

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 () 
		)
	)
)

delete isolated vertices

Spacelord · 2016-12-23

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.

what about this...

vusta · 2016-12-23

objsToAffectArr = for geo in geometry collect geo

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