Hi im new in maxscript and i want to make script to find duplicate objects in the scene on button pressed. But, when i press button i want to my script just write how many of them found. then, on button "Clean" to clean duplicate objects :D sry for my english.
So, i dont want to get objet selected when script find objects...just to write how many
Ill post code i found on the internet. When i press button that script find and select objects.
fn doubleSelect mode: del:off =
(
local objArr = objects as array
local uniqueObjs = dataPair node:#() hash:#()
for o in objArr where (findItem uniqueObjs.hash (e = gethashvalue o.pos 0)) == 0 do (append uniqueObjs.hash e ; append uniqueObjs.node o)
select uniqueObjs.node ; max select invert
if uniqueObjs.node != 0 do
(
deleteObj.enabled = true
cpObj.color = red
)
lbldObj.text="-- "+(selection.count as String+" deleted Objects!")
)