this?
(
subObjectLevel = 4
gmod = modPanel.getCurrentObject()
gmod.selectByMaterialID = 1 -- zero based
gmod.ButtonOp #SelectByMaterial
gmod.ButtonOp #DetachFace
)
–Select $whatever
macros.run “Modifiers” “Volumeselect”
$.modifiers[#Vol__Select].volume = 5
$.modifiers[#Vol__Select].level = 2
–$.modifiers[#Vol__Select].matID = 1 –default
$.modifiers[#Vol__Select].invert = on
macros.run “Modifiers” “DeleteMesh”
I could of course post another gif with a plane and extruded polygon showing that it works as expected, but I it doesn’t make any difference. No matter what kind of mesh you provide as long as it has applied edit poly mod it should work as you want it to in the first post. Hope you get your way through all other corner cases which may exist.
gif
Generate Mat IDs in Extrude mod.
Why do you doing this in MaxScript anyway?
You can’t skip learning Max.
Many still trying that, though…
Thank you everyone. Thank you very much.The right code is still not found.