EvilTools

MaxScript / Detach Faces

Oct 7th, 2026 (edited)
7
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | Source Code | 0 0
  1. (
  2. fn detachFacesAsClone obj:undefined =
  3. (
  4. local sel = if (isvalidnode obj) then obj else $
  5. local n = undefined
  6. if (iskindof sel editable_poly) do (
  7. local sf = polyop.getfaceselection sel
  8. if not sf.isEmpty do (
  9. local nn = uniquename (sel.name + "_")
  10. polyop.detachfaces sel sf asNode:true delete:false name:nn
  11. n = getnodebyname nn
  12. if isvalidnode n do (
  13. subobjectlevel = 0 -- optional
  14. centerpivot n
  15. select n
  16. )
  17. )
  18. )
  19. --n
  20. )
  21. detachFacesAsClone()
  22. )
Tags: MaxScript
Advertisement
Add Comment
Please, Sign In to add comment