macroScript Grouper category: "MaxScript==Shit"
(
on isEnabled return
selection.count > 0
on execute do
(
createDialog (
rollout mf_main "LOD Grouper"
(
button savebtn "Group Proper LODs"
on savebtn pressed do
(
max_count = 2
lodlist = #()
for index in 1 to $.count do
(
if($[1].name == $[index].name + "_lod1")
then(append lodlist $[1])
else()
if($[1].name == $[index].name + "_lod1")
then(append lodlist $[index])
else(reset)
print lodlist
)
lodgroup = group lodlist
select lodgroup
)
)
)
)
)
This is my script it is doing what I want by checking names in the selection and comparing them to see which match based on prefix and suffix but its only doing it to one the objects in my selection instead of looping through my selection array
example of what Im trying to make the script do
objects name box01, box01_lod1 / box02, box02_lod1 / box03 , box03_lod1
group-1 group-2 group-3
any help is much appreciated
thanks in advance