Disable hotkeys in viewer H17
2200 9 3- Alexey Vanzhula
- Member
- 538 posts
- Joined: 12月 2006
- Offline
- mabelzile
- スタッフ
- 401 posts
- Joined: 2月 2018
- Offline
Hello,
you can disable the example viewer state hotkeys from the Hotkey Manager:
“Houdini|Panes|Geometry Viewers|Operations|Modeling (SOP) Operations|sidefx_bend Operation”
“Houdini|Panes|Geometry Viewers|Operations|Modeling (SOP) Operations|sidefx_stroke Operation”
or simply remove the $HFS/viewer_states folder.
-mab
you can disable the example viewer state hotkeys from the Hotkey Manager:
“Houdini|Panes|Geometry Viewers|Operations|Modeling (SOP) Operations|sidefx_bend Operation”
“Houdini|Panes|Geometry Viewers|Operations|Modeling (SOP) Operations|sidefx_stroke Operation”
or simply remove the $HFS/viewer_states folder.
-mab
- Alexey Vanzhula
- Member
- 538 posts
- Joined: 12月 2006
- Offline
_mab_
Hello,
you can disable the example viewer state hotkeys from the Hotkey Manager:
“Houdini|Panes|Geometry Viewers|Operations|Modeling (SOP) Operations|sidefx_bend Operation”
“Houdini|Panes|Geometry Viewers|Operations|Modeling (SOP) Operations|sidefx_stroke Operation”
or simply remove the $HFS/viewer_states folder.
-mab
Hi. I need to temporarily disable hotkeys in my tools. Currently I disabled it with Qt. But maybe H17 has some improvements in this area
Edited by Alexey Vanzhula - 2018年10月22日 15:03:20
- rafeek
- スタッフ
- 98 posts
- Joined: 8月 2015
- Offline
- Alexey Vanzhula
- Member
- 538 posts
- Joined: 12月 2006
- Offline
- rafeek
- スタッフ
- 98 posts
- Joined: 8月 2015
- Offline
vux
hotkeys HOM module was available from H16.5, but I can't find function to remove all hotkeys
The interface was re-organized a bit and documented in H17. There isn't a wholesale clear everything function so what you'd have to do is traverse the tree and clear the hotkeys you want cleared, even if you want to clear them all.
You can look at $HFS/houdini/python2.7libs/hotkeys/mainwidget.py in the modelGetAllCommands() function for an example of traversing the hotkey tree.
- Alexey Vanzhula
- Member
- 538 posts
- Joined: 12月 2006
- Offline
rafeekvux
hotkeys HOM module was available from H16.5, but I can't find function to remove all hotkeys
The interface was re-organized a bit and documented in H17. There isn't a wholesale clear everything function so what you'd have to do is traverse the tree and clear the hotkeys you want cleared, even if you want to clear them all.
You can look at $HFS/houdini/python2.7libs/hotkeys/mainwidget.py in the modelGetAllCommands() function for an example of traversing the hotkey tree.
Thank you. I'll inspect it
- Alexey Vanzhula
- Member
- 538 posts
- Joined: 12月 2006
- Offline
import hou def clear_hotkeys(ctx=''): exclude_cmds = 'Cut', 'Copy', 'Paste' for key in hou.hotkeys.contextsInContext(ctx): if key['symbol'] == 'inputfield': continue for key_ in hou.hotkeys.commandsInContext(key['symbol']): if key_['label'] in exclude_cmds: continue hou.hotkeys.clearAssignments(key_['symbol']) clear_hotkeys(key['symbol']) clear_hotkeys()
Edited by Alexey Vanzhula - 2018年10月23日 15:13:29
- rafeek
- スタッフ
- 98 posts
- Joined: 8月 2015
- Offline
vuximport hou def clear_hotkeys(ctx=''): exclude_cmds = 'Cut', 'Copy', 'Paste' for key in hou.hotkeys.contextsInContext(ctx): if key['symbol'] == 'inputfield': continue for key_ in hou.hotkeys.commandsInContext(key['symbol']): if key_['label'] in exclude_cmds: continue hou.hotkeys.clearAssignments(key_['symbol']) clear_hotkeys(key['symbol']) clear_hotkeys()
Ok looks good now! I first saw the non-recursive version and was about to comment.
I would suggest saving the assignments into a dict to make it easy to restore. Also note that the ‘label’ field isn't unique.
- Alexey Vanzhula
- Member
- 538 posts
- Joined: 12月 2006
- Offline
-
- Quick Links