MAXSCRIPT: quickBridge - One bridge ( connect too) to rule them all.

by

Very short script I've wrote that will detect which sub-selection of editable poly you are in, and will try to connect the selected objects - so you can bind it under one key instead of four:

If you're in vertex sub-selection, it'll connect selected verticles.
If you're in edge sub-selection, it'll bridge selected edges.
If you're in border sub-selection, it'll cap selected border.
If you're in face sub-selection, it'll bridge selected faces.

Code for script:
macroScript quickBridge 
    category:"_Piro_Tools" 
    tooltip:"MESH: quickBridge" 
    buttontext:"MESH: quickBridge"
(
    if (classof (modPanel.getCurrentObject()) == Editable_Poly) then
    (
        case subObjectLevel of
        (
            1: ($.EditablePoly.ConnectVertices())
            2: ($.EditablePoly.Bridge())
            3: ($.EditablePoly.capHoles #Edge)
            4: (
                    $.bridgeSelected = 1
                    $.EditablePoly.Bridge()
               )
        )
    )
    else if (classof (modPanel.getCurrentObject()) == Edit_Poly) then
    (
        case subObjectLevel of
        (
            1: ($.modifiers[#Edit_Poly].ButtonOp #ConnectVertices)
            2: ($.modifiers[#Edit_Poly].ButtonOp #BridgeEdge)
            3: ($.modifiers[#Edit_Poly].ButtonOp #Cap)
            4: ($.modifiers[#Edit_Poly].ButtonOp #BridgePolygon)
        )    
    )
)

After evaluating it in maxscript editor / saving it as .ms and drag-n-dropping on max, You'll find "MESH: quickBridge" macro under "_Piro_Tools" category in customisation menu. Enjoy

quick edit - now works on both Editable_Poly and Edit_Poly modifier!

Btw, thanks for GPT4 for streamlining this script into nice compact version.