Maybe I do not understand the principle or just did not find these items, but I need hotkeys for frequently, but short-term, interface functions and I could not find them in the hotkey editor, and Ctrl + Shift + Alt + click reports that assigning hotkeys to them is not available. As I understand it, there are no hotkeys for most buttons in the viewport panels and they cannot be assigned, right? I most often need to turn on / off 1) Concindent points 2) Switching to Matcap and back 3) displaying the boundaries of 3D objects. Turning on / off through many clicks and menu hits takes much more time than viewing the result. This is incredibly inefficient and even absurd.
Maybe these items can somehow be assigned to hotkeys? Scripts or maybe they are somehow cleverly called in the hotkey editor? Can someone suggest a way?
Question for developers - what is the logic behind the fact that some interface items are not served by hotkeys? What is the principle of discrimination?
Hotkeys do not work for all menu items?
828 7 0- RGaal
- Member
- 143 posts
- Joined: June 2024
- Offline
- alexwheezy
- Member
- 297 posts
- Joined: Jan. 2013
- Offline
All of these settings can be set via the Python API, which means attaching a hotkey to this.
https://www.sidefx.com/docs/houdini/hom/hou/GeometryViewportSettings.html [www.sidefx.com]
https://www.sidefx.com/docs/houdini/hom/hou/GeometryViewportSettings.html [www.sidefx.com]
- RGaal
- Member
- 143 posts
- Joined: June 2024
- Offline
- alexwheezy
- Member
- 297 posts
- Joined: Jan. 2013
- Offline
RGaal
The help indicates the function hou.boundaryDisplay, which controls the highlighting of 3D borders in the viewport. But chatgpt couldn't make a working code with it after 30 attempts, ahaha.
Can any of the leather users show an example of a script on how to use this function correctly?
To give you an example,
pane = hou.ui.curDesktop().paneTabOfType(hou.paneTabType.SceneViewer) settings = pane.curViewport().settings() tmplset = settings.displaySet(hou.displaySetType.DisplayModel) tmplset.setBoundaryMode(hou.boundaryDisplay.On)
- RGaal
- Member
- 143 posts
- Joined: June 2024
- Offline
- RGaal
- Member
- 143 posts
- Joined: June 2024
- Offline
If someone needs it - switch via hotkey to matcap and back.
I am constantly amazed at how easy Houdini could be convenient, but how inconvenient it is. I experience constant cognitive dissonance.
I am constantly amazed at how easy Houdini could be convenient, but how inconvenient it is. I experience constant cognitive dissonance.
scene_viewer = hou.ui.paneTabOfType(hou.paneTabType.SceneViewer) viewport = scene_viewer.curViewport() settings = viewport.settings(); current_material = settings.getDefaultMaterialType() if current_material == hou.viewportDefaultMaterial.MatCap: settings.setDefaultMaterialType(hou.viewportDefaultMaterial.Simple) else: settings.setDefaultMaterialType(hou.viewportDefaultMaterial.MatCap) viewport.draw()
Edited by RGaal - Sept. 24, 2024 10:31:35
- RGaal
- Member
- 143 posts
- Joined: June 2024
- Offline
- alexwheezy
- Member
- 297 posts
- Joined: Jan. 2013
- Offline
RGaal
And the last problem remains - Coincident points. Search did not help me at all, there is no such function in python or it is called something strange.
If someone knows how to enable this function with a script - please let me know.
It's called showCoincidentPoints()
https://www.sidefx.com/docs/houdini/hom/hou/GeometryViewportDisplaySet.html [www.sidefx.com]
-
- Quick Links