Hi, I have a script in 3ds max that detaches model elements by ID, but it doesn't work when I select multiple objects, can anybody fix this script?
Thanks in advance!
Here's the script
(
for obj in selection do
macros.run "Modifier Stack" "Convert_to_Poly"
(
(
local MatID = 1
while (polyop.getNumFaces $ > 0) do
(
$.selectByMaterial MatID
polyList = polyop.getFaceSelection $
if (polyList.count > 0) do
(
newName = (uniquename "DetachedObject")
polyOp.detachfaces $ polyList delete:true asnode:true name:newName
)
MatID += 1
)
)
)
)
Replies