cval

cval

About Me

Connect

LOCATION
Not Specified
ウェブサイト

Houdini Skills

Availability

Not Specified

Recent Forum Posts

Python Viewer State and Hotkeys 2023年1月29日19:32

Thank you so much for your answer @playBalster!

I will test this as soon as I can

scriptMenuStripRadio default value 2022年10月19日10:28

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

Setting default hotkeys for a tool distributed in a package 2022年10月18日23:31

Hello everybody

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