Houdini - Startup Settings
The path to the user’s directory is stored in the environment variable HOUDINI_USER_PREF_DIR
.
windows: ${HOME}\Documents\houdini18.0
Startup Scripts
Startup scripts are located in ${$HOUDINI_USER_PREF_DIR}/scripts
.
When Houdini starts up, it sources for 123.py
. This is executed only once when Houdini launches.
To execute a script on each scene load, Houdini sources for 456.py
in the same scripts
folder. This file is also executed when Houdini first launches the default untitled.hip
.
Creating a custom menu bar item
Houdini sources for a file named MainMenuCommon.xml
in your user preferences.
Here, we create a menu called My Custom Menu
that has one subitem called New Camera
which executes an inlined Python script.
<mainMenu>
<menuBar>
<subMenu id="mymenu1">
<label>My Custom Menu</label>
<insertAfter />
<scriptItem id="myitem1">
<label>New Camera</label>
<scriptCode>
<![CDATA[
cam = hou.node("/obj").createNode("cam")
cam.parm("ty").set(2)
cam.parm("tz").set(3)
cam.parm("rx").set(-30)
]]>
</scriptCode>
</subMenu>
</menuBar>
</mainMenu>
Check here for more.