検索 - User list
Full Version: Can I Bypass the limitation on hotkey shortcuts?
Root » Houdini Lounge » Can I Bypass the limitation on hotkey shortcuts?
itsjustregi
* EDIT...Glitch...seems now the the toggle mode is now working properly


Hi,

Looking to see if there is a way to bypass the limitation of shortcuts being
set to viewport rendering shading. While working on a model, I would like
to have to ability to switch into "xray" aka wireframe ghost with a hotkey.
But for some reason you can not set this or any other shading mode via hotkey.

Is there anyway around this?

I also have Wire toggle mode set to Wireframe Ghost...but this seems to not work

Houdini 20.0.590

Thanks
animatrix_
Hi,

You can implement these in Python and drag over to a shelf to create a shelf tool which you can assign a hotkey too. For example to toggle between hidden line and wireframe modes:

def toggleHiddenLineWireframe():
    with hou.undos.disabler():
        editor = hou.ui.paneTabUnderCursor()
        if not editor:
            editor = hou.ui.paneTabOfType(hou.paneTabType.SceneViewer)
        if editor:
            editortype = editor.type()
            if editortype == hou.paneTabType.SceneViewer:
                settings = editor.curViewport().settings()
                displayset = settings.displaySet(hou.displaySetType.DisplayModel)
                shading = hou.glShadingType.WireGhost if displayset.shadedMode() == hou.glShadingType.HiddenLineInvisible else hou.glShadingType.HiddenLineInvisible
                displayset.setShadedMode(shading)
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Powered by DjangoBB