How to assign a shortcut key for enabling/disabling simulati

   233   1   1
User Avatar
Member
1 posts
Joined: Sept. 2018
Offline
I want to assign a shortcut key for enabling/disabling simulations using Python code. I found that shortcuts can be assigned with a script like hou.hotkeys.addAssignment(hotkey_symbol, key). What I’m curious about is what the hotkey_symbol that represents enable/disable simulations is, the one that I can write inside the parentheses.
User Avatar
Member
2561 posts
Joined: June 2008
Offline
Place this code inside a shelf tool, and assign F6 as the hot key. It will turn on and off Auto Update. (lower right corner)
if hou.ui.updateMode() == hou.updateMode.AutoUpdate:
    hou.ui.setUpdateMode(hou.updateMode.Manual)
else:
    hou.ui.setUpdateMode(hou.updateMode.AutoUpdate)
Using Houdini Indie 20.0
Windows 11 64GB Ryzen 16 core.
nVidia 3050RTX 8BG RAM.
  • Quick Links