Home Technical Talk

Maxscript - toggle display selected edged faces

polycounter lvl 18
Offline / Send Message
solar polycounter lvl 18
Does anyone know how to create a shortcut toggle for displaying selected with edged faces? The option is found in the viewport config screen but the maxscript listener doesn't show anything when I switch it on/off. I seem to use this option all the time so it would be really handy to bind it to a key/quad menu.

Replies

  • CompanionCube
    Options
    Offline / Send Message
    CompanionCube polycounter lvl 12
    you set it in customize user interface > Keyboard > views > Display selected with edged faces.

    i have mine set to shift + F4
  • solar
    Options
    Offline / Send Message
    solar polycounter lvl 18
  • spacefrog
    Options
    Offline / Send Message
    spacefrog polycounter lvl 15
    "Display selected with Edges" are different functions in Nitrous and DirectX mode...
    Thus the old shortcut will not work...

    here's a small maxscript to fix that, It chekcs if you are using nitrous or DirectX, and calls the correct function after that. just map it to your shortcut you used previously ...

    macroScript Nitrous_ToggleSelectedWithEdges    category:"Spacefrog Tools"     toolTip:"Nitrous: Toggle Show Selected with Edges"
    (
        if( NitrousGraphicsManager.isEnabled() ) then
        (
            vs = NitrousGraphicsManager.GetActiveViewportSetting();    
            vs.SelectedEdgedFacesEnabled = not(vs.SelectedEdgedFacesEnabled)
        )
        else()
        (
            -- # above failed -> so asume we are in DX mode
            -- # did n't find direct maxscript command, so use actionmanager
            actionMan.executeAction 0 "59230"
        )
    
    )
    
  • spacefrog
    Options
    Offline / Send Message
    spacefrog polycounter lvl 15
    "Display selected with Edges" are different functions in Nitrous and DirectX mode...
    Thus the old shortcut will not work...

    here's a small maxscript to fix that, It chekcs if you are using nitrous or DirectX, and calls the correct function after that. just map it to your shortcut you used previously. Has the advantage that you can start in Nitrous or DirectX and the same shortcut works in both modes... ....


    macroScript Nitrous_ToggleSelectedWithEdges    category:"Spacefrog Tools"     toolTip:"Nitrous: Toggle Show Selected with Edges"
    (
        if( NitrousGraphicsManager.isEnabled() ) then
        (
            vs = NitrousGraphicsManager.GetActiveViewportSetting();    
            vs.SelectedEdgedFacesEnabled = not(vs.SelectedEdgedFacesEnabled)
        )
        else()
        (
            -- # above failed -> so asume we are in DX mode
            -- # did n't find direct maxscript command, so use actionmanager
            actionMan.executeAction 0 "59230"
        )
    
    )
    
Sign In or Register to comment.