Jump to content

Keyboard shortcut to toggle template visibility

Recommended Posts

3 hours ago, Ian Mackinnon said:

Is there a keyboard shortcut to toggle the visibility of currently templated objects in the scene view? Or would it be possible to configure one?

Yes. Do a CTRL + ALT + SHIFT on the UI you want a shortcut for, then configure it.

Also you can run run that dialog with edit hotkeys.

You want a shortcut for: Cycle View context, but CTRL + ALT + SHIFT will tell you that

Also, be aware that if you are running Windows (at least 7), shift + alt will also change the keyboard layout if you have several ones already installed, which can be confusing because it's done silently..


Edit: Sorry, I misread the question, I thought you were talking about other objects visibility.

Edited by AntoineSfx
Link to comment
Share on other sites

Thanks Antoine,

It's useful to know about that hotkey feature, though in this case it appears not to work. I tried opening the display options dialog for the scene view, then clicking on "Templated geometry" under the "Guides" tab, but the status line reports, "WARNING: Hotkey access not available for the selected gadget."

I wonder whether there is some other way to set that option, perhaps from Python or Hscript.

Link to comment
Share on other sites

Create new shelf tool and assign a shortcut to it.

"Guides / Templated geometry" display option still not in HOM in Houdini 16.5 (it can be part of hou.GeometryViewportDisplaySet, I suppose). Use viewdisplay command. I didn't find a way to determine the option's state. Session can be is used to store it, but if templated geo were disabled initially, it will do nothing first time tool is used.

Use this as the tool's Python script:

import hou
import toolutils

# Toggle mechanism using session module.
tgd = hou.session.__dict__.get('templated_geo_display', 'on')
tgd = 'off' if tgd == 'on' else 'on'
hou.session.templated_geo_display = tgd

viewport = '%s.%s.world' % (hou.ui.curDesktop().name(),

command = 'viewdisplay -T %s %s' % (tgd, viewport)


Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...