Can I Bypass the limitation on hotkey shortcuts?

   525   1   1
User Avatar
Member
5 posts
Joined: 10月 2015
Offline
* 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
Edited by itsjustregi - 2024年2月1日 11:15:10

Attachments:
Screenshot 2024-02-01 105700.png (99.1 KB)

User Avatar
Member
4515 posts
Joined: 2月 2012
Offline
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)
Senior FX TD @ Industrial Light & Magic
Get to the NEXT level in Houdini & VEX with Pragmatic VEX! [www.pragmatic-vfx.com]

youtube.com/@pragmaticvfx | patreon.com/animatrix | animatrix2k7.gumroad.com
  • Quick Links