Notifications
Clear all

[Closed] Isolate polygons

I’m sure this has been done and a script is already readily available but I wanted to make it myself but somehow can not get my script to work.

I want to isolate polygons in the exact way we can isolate objects with the [ALT+Q] function.

IT actually worked for a while until I rebooted max, after that it started producing errors.

this is the snippet


    (
         sentaku = polyOp.getFaceSelection $ ---選択された面を取得する---
        p = polyOp.setFaceSelection $ -sentaku ---選択を反転する---
        $.ButtonOp #HideSelection ---選択された面を非表示する
   subobjectLevel = 1 
        redrawViews() ---ビューポートをリフレッシュ
        )    

Im getting the following error:

–Argument count error: buttonOp wanted 1, got 2

I only see the #hideselection argument so what is the second argument that is being read??

3 Replies
1 Reply
(@miauu)
Joined: 11 months ago

Posts: 0

This one works with editable_poly and edit_poly mod


case classof (_mod = modPanel.getCurrentObject()) of
(
    Edit_Poly :
    (
        if subObjectLevel == 4 and not (_mod.GetSelection #Face).isEmpty do (

            _mod.ButtonOp #HideUnselectedFace
            redrawViews()
        )        
        
    )
    
    Editable_Poly :
    (        
        if subObjectLevel == 4 and not (fsel = polyop.getFaceSelection _mod).isEmpty do
        (
        
            polyop.setHiddenFaces _mod -fsel
            redrawViews()
            
        )
        
    )
    
    default: ()
    
    
)

Thanks for the replies and the working script guys but I was actually hoping that you could explain what was wrong with my script and why it didn’t work so I might actually be able to learn something.