![](https://media.sidefx.com/accounts/avatars/124543/resized/160/160/891468015547783f044b1.png)
cval
cval
About Me
Connect
LOCATION
Not Specified
WEBSITE
Houdini Skills
Availability
Not Specified
Recent Forum Posts
Python Viewer State and Hotkeys Jan. 29, 2023, 7:32 p.m.
Thank you so much for your answer @playBalster!
I will test this as soon as I can
I will test this as soon as I can
![](/static/djangobb_forum/img/smilies/smile.png)
scriptMenuStripRadio default value Oct. 19, 2022, 10:28 a.m.
Hello everybody,
I am building a menu with radio buttons and in the documentation [www.sidefx.com], I see that scriptMenuStripRadio seems a good way. The problem that I have is that I do not understand how to set the default value for the scriptMenuStripRadio. When I launch houdini and open my menu, all radio buttons are "unchecked". I would like to define the initial value for the strip in my menu definition. Is there a way to do this?
Also, when looking at examples from houdini menus, I see that menuStripRadio is used instead of scriptMenuStripRadio. However, I do not find any documentation about menuStripRadio. If I try using menuStripRadio, then I find that there is an initial radio button that is "checked" when I open my menu. However, I do not know how to read that value in python since there is not global variable associated with it.
Any hints would be very much appreciated.
Thank you
I am building a menu with radio buttons and in the documentation [www.sidefx.com], I see that scriptMenuStripRadio seems a good way. The problem that I have is that I do not understand how to set the default value for the scriptMenuStripRadio. When I launch houdini and open my menu, all radio buttons are "unchecked". I would like to define the initial value for the strip in my menu definition. Is there a way to do this?
Also, when looking at examples from houdini menus, I see that menuStripRadio is used instead of scriptMenuStripRadio. However, I do not find any documentation about menuStripRadio. If I try using menuStripRadio, then I find that there is an initial radio button that is "checked" when I open my menu. However, I do not know how to read that value in python since there is not global variable associated with it.
Any hints would be very much appreciated.
Thank you
![](/static/djangobb_forum/img/smilies/smile.png)
Setting default hotkeys for a tool distributed in a package Oct. 18, 2022, 11:31 p.m.
Hello everybody ![](/static/djangobb_forum/img/smilies/smile.png)
I am developing a tool that is being distributed through a package. The tool is adding functionnalities to the animation graph and those new functionnalities are available to the user through a custom menu added to the animation graph (by including a custom AnimationEditorGraphMenu.xml in my package). I would like to add hotkeys to those menu entries, but I am not sure what would be the correct way. By looking in the houdini installation folder, I discovered that hotkeys are set by the Hotkeys file found in houdini\config\Hotkeys folder. I tried to replicate this pattern in my package, but this resulted in a lot of errors when launching houdini (hotkey symbols not being found). So I guess that this way is destructive and not legit...
My second attempt was to use a keymap override instead of a config\Hotkeys folder. So I created a Houdini.keymap.overrides file that I saved at the root of my package. This seems to work, but I wonder if this will only work for the Houdini keymap? What if the user made a custom keymap?
In the documentation, I see that there is a hou.hotkeys python module : https://www.sidefx.com/docs/houdini/hom/hou/hotkeys.html [www.sidefx.com]
Should I use this instead? Is there a way to execute a python file when the package is loaded that would create the needed contexts and hotkey assignments? (like a startup script I suppose...)
To summarize, my question is: what would be the most legit way of distributing a package with hotkeys assignations?
Thanks in advance for any help
![](/static/djangobb_forum/img/smilies/smile.png)
I am developing a tool that is being distributed through a package. The tool is adding functionnalities to the animation graph and those new functionnalities are available to the user through a custom menu added to the animation graph (by including a custom AnimationEditorGraphMenu.xml in my package). I would like to add hotkeys to those menu entries, but I am not sure what would be the correct way. By looking in the houdini installation folder, I discovered that hotkeys are set by the Hotkeys file found in houdini\config\Hotkeys folder. I tried to replicate this pattern in my package, but this resulted in a lot of errors when launching houdini (hotkey symbols not being found). So I guess that this way is destructive and not legit...
My second attempt was to use a keymap override instead of a config\Hotkeys folder. So I created a Houdini.keymap.overrides file that I saved at the root of my package. This seems to work, but I wonder if this will only work for the Houdini keymap? What if the user made a custom keymap?
In the documentation, I see that there is a hou.hotkeys python module : https://www.sidefx.com/docs/houdini/hom/hou/hotkeys.html [www.sidefx.com]
Should I use this instead? Is there a way to execute a python file when the package is loaded that would create the needed contexts and hotkey assignments? (like a startup script I suppose...)
To summarize, my question is: what would be the most legit way of distributing a package with hotkeys assignations?
Thanks in advance for any help
![](/static/djangobb_forum/img/smilies/smile.png)