select all objects with the base modifier editable mesh

I need to create two arrays and populate one with all the body objects in the scene and another with all the editable meshes in the scene. Any clues, i'm new to max script.

Thanks

Comments

Comment viewing options

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

sorted

Don't worry, sorted.

macroScript 3diFixCad
category:“3diTools”
toolTip:“FixCAd”
(
undo off
(
WM_SETREDRAW=0xB
windows.sendmessage (windows.getmaxhwnd()) WM_SETREDRAW 0 0
)
fn FixMesh i = (

FixAll = xform name:“3diXform”
addModifier i FixAll

AddMesh = edit_mesh name:“3diEditMesh”
addModifier i AddMesh
select i
maxOps.CollapseNodeTo $ 1 off

)

fn FixBody i = (

poly2 = Edit_Poly name:“3diEditPoly”
addModifier i poly2

)

SelectionArr = selection as array

Count = 0
for i in SelectionArr do(
CurrentTypeOfObject = classof i.baseobject
Count = Count +1
print (“item ” + Count as string)

case CurrentTypeOfObject of
(
Body_Object: FixBody(i)
Editable_Mesh: FixMesh(i)
)

)
(
WM_SETREDRAW=0xB
windows.sendmessage (windows.getmaxhwnd()) WM_SETREDRAW 1 0
)
)

Damn you computer.

Comment viewing options

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