Hello everyone,
I'm new to Houdini and I hope my question makes sense and is appropriate.
I'm wondering what is the best strategy to distribute tools with menus.
For example, let's consider python scripts that implement a tool. I would like this tool to have a submenu in Houdini's main menu bar.
According to the documentation I've found, I need to create an XML file to modify the main menu :
http://www.sidefx.com/docs/houdini13.0/basics/config_menus [sidefx.com]
It is my understanding that if I ask the user to copy MainMenuCommon.xml from my tool distribution to his HoudiniPath, then he might be overwriting his own MainMenuCommon.xml.
How to deal with various tools that would each need to be in the main menu bar? I do not want to ask the user to modify his own MainMenuCommon.xml by hand… Is it possible to have multiple MainMenuCommon.XML files (one per tool)? Where to put them?
Is it possible to add submenus programmatically (in python)?
Thanks in advance for any pointers.
Tool distribution with Main Menu
5921 5 1- Carioca
- Member
- 16 posts
- Joined: Oct. 2014
- Offline
- rafal
- Staff
- 1448 posts
- Joined: July 2005
- Offline
Houdini searches for all MainMenuCommon.xml files in HOUDINI_PATH, so you could install your xml menu in a custom directory and add that directory to the path.
Another solution is to include one XML file from another:
<!DOCTYPE mainMenu >
<mainMenu>
&testMenu;
</mainMenu>
There are some plans to improve the menu, such as adding MainMenuCommon subdir in which all .xml files would be automatically loaded by Houdini. Unfortunately, that's not available yet.
Another solution is to include one XML file from another:
<!DOCTYPE mainMenu >
<mainMenu>
&testMenu;
</mainMenu>
There are some plans to improve the menu, such as adding MainMenuCommon subdir in which all .xml files would be automatically loaded by Houdini. Unfortunately, that's not available yet.
- Carioca
- Member
- 16 posts
- Joined: Oct. 2014
- Offline
- Carioca
- Member
- 16 posts
- Joined: Oct. 2014
- Offline
Hi Rafal,
I'm on windows 7, running Houdini FX non-commercial.
In Houdini, when I print my environment variables, there is no entry for HOUDINI_PATH.
When I look in windows environment variables it is not there neither. So I create one, but Houdini gives errors when starting and does not work.
Alternatively, I've tried modifying the houdini.env file to add the environment variable there, but same result.
Any idea?
Here's the errors I get:
ERROR: Couldn't open resource file “resources” (No such file or directory)
UT_Interrupt: Couldn't find idialog.exe
Color name ‘TextboxBG’ is missing from the theme.
Color name ‘ListEntry1’ is missing from the theme.
Color name ‘ListEntry2’ is missing from the theme.
Color name ‘ListTitleGradHi’ is missing from the theme.
Color name ‘ListTitleGradLow’ is missing from the theme.
Can't load font ‘Proportional’ - Using default.
Color name ‘CheckBG’ is missing from the theme.
ERROR: Couldn't open “hkey13.0.447/hkey.ui” for reading: No such file or directory
I'm on windows 7, running Houdini FX non-commercial.
In Houdini, when I print my environment variables, there is no entry for HOUDINI_PATH.
When I look in windows environment variables it is not there neither. So I create one, but Houdini gives errors when starting and does not work.
Alternatively, I've tried modifying the houdini.env file to add the environment variable there, but same result.
Any idea?
Here's the errors I get:
ERROR: Couldn't open resource file “resources” (No such file or directory)
UT_Interrupt: Couldn't find idialog.exe
Color name ‘TextboxBG’ is missing from the theme.
Color name ‘ListEntry1’ is missing from the theme.
Color name ‘ListEntry2’ is missing from the theme.
Color name ‘ListTitleGradHi’ is missing from the theme.
Color name ‘ListTitleGradLow’ is missing from the theme.
Can't load font ‘Proportional’ - Using default.
Color name ‘CheckBG’ is missing from the theme.
ERROR: Couldn't open “hkey13.0.447/hkey.ui” for reading: No such file or directory
- rafal
- Staff
- 1448 posts
- Joined: July 2005
- Offline
You need to explicitly include the default directories when you explicitly define HOUDINI_PATH. You can find out the default settings by running:
hconfig -ap
Also you can search the forum for posts with HOUDINI_PATH for some further hints how to properly define it. Here is one such post:
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=26537 [sidefx.com]
There is also a doc page about env vars in Houdini:
http://www.sidefx.com/docs/houdini13.0/basics/config_env [sidefx.com]
hope this helps,
Rafal
hconfig -ap
Also you can search the forum for posts with HOUDINI_PATH for some further hints how to properly define it. Here is one such post:
https://www.sidefx.com/index.php?option=com_forum&Itemid=172&page=viewtopic&t=26537 [sidefx.com]
There is also a doc page about env vars in Houdini:
http://www.sidefx.com/docs/houdini13.0/basics/config_env [sidefx.com]
hope this helps,
Rafal
- Carioca
- Member
- 16 posts
- Joined: Oct. 2014
- Offline
Thank you Rafal for your answer.
For future reference, here's how I needed to set my HOUDINI_PATH environment variable to work:
HOUDINI_PATH=“CPathToToolA;CPathToToolB;&”
It worked either by adding the environment variable in the houdini.env or by creating the windows environment variable.
The hconfig -ap tool was a great help.
I find that setting the houdini.env file works better for me because it is more portable if I copy my user folder. Also it is easier to debug with the hconfig tool since I do not have to restart it everytime to see the change as it is the case when modifying the windows environment variable.
Cheers
For future reference, here's how I needed to set my HOUDINI_PATH environment variable to work:
HOUDINI_PATH=“CPathToToolA;CPathToToolB;&”
It worked either by adding the environment variable in the houdini.env or by creating the windows environment variable.
The hconfig -ap tool was a great help.
I find that setting the houdini.env file works better for me because it is more portable if I copy my user folder. Also it is easier to debug with the hconfig tool since I do not have to restart it everytime to see the change as it is the case when modifying the windows environment variable.
Cheers
-
- Quick Links