Announcement

Collapse
No announcement yet.

need some help with a script.

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • need some help with a script.

    i've spend several hours to find a script for the following problem.
    after importing 3ds files from cad software i've end up with many meshes with isolated vertices.
    one script i've found can fix this for only one mesh in single selection.



    macroscript RemoveIsolatedVertices category:"- SelfMade -"

    (

    on isEnabled return

    (

    selection.count == 1 and classOf selection[1].baseobject == Editable_Mesh

    )

    on execute do

    (

    max modify mode

    modPanel.setCurrentObject $.baseobject

    meshOps.removeIsolatedVerts $

    )

    )



    im not able to rewrite it so it works with multiple selection.
    after import i have hundred of meshes with isolated vertices.
    can anyone please help me or is knowing a script for that case?
    thanks for any advice!

    axel

  • #2
    This should do the trick:

    Code:
    macroscript RemoveIsolatedVertices2 category:"- SelfMade -" 
    (
        on execute do 
        (
            for o in selection where classof o == Editable_Mesh do meshop.deleteIsoVerts o
        )
    )

    Comment


    • #3
      hey codi!

      works perfect! and it's a very efficient and fast script. even on hundreds of objects. thanks for your help!

      Comment


      • #4
        You are welcome

        Comment

        Working...
        X