On this page |
Note
It is much easier to edit the shelf in Houdini. However, in a large site it may be useful at times to batch edit/replace shelf files directly.
Overview
Houdini loads any files with a .shelf
extension in the path specified by the TOOLBAR_PATH
environment variable. By default this is HOUDINI_PATH/toolbar
, so for example you can override the "factory" files in $HFS/houdini/toolbar
using files in $HOME/houdiniX.x/toolbar
.
Shelf configuration files are in XML format. See below for information about each tag. There is also an XSD schema file, $HFS/houdini/toolbar/shelf.xsd
, you can use to validate your own XML shelf definition files.
<?xml version="1.0" encoding="UTF-8"?> <shelfDocument> <shelfSet name="some_shelf_set" label="Some Shelf Set"> <memberToolshelf name="some_shelf"/> </shelfSet> <toolshelf name="some_shelf" label="Some Shelf"> <memberTool name="some_tool"/> </toolshelf> <tool name="sample_tool" label="Sample Tool" icon="PLASMA_App"> <helpText><![CDATA[the main help]]></helpText> <helpURL>help URL</helpURL> <toolMenuContext name="viewer"> <contextNetType>OBJ</contextNetType> <contextNetType>SOP</contextNetType> <contextNetType>POP</contextNetType> <contextNetType>DOP</contextNetType> </toolMenuContext> <toolMenuContext name="pop_viewer"> <contextNetType>POP</contextNetType> </toolMenuContext> <toolMenuContext name="cop_viewer"> <contextNetType>COP2</contextNetType> </toolMenuContext> <toolMenuContext name="network"> <contextOpType>table/operator</contextOpType> <contextNetType>OBJ</contextNetType> <contextNetType>SOP</contextNetType> <contextNetType>POP</contextNetType> <contextNetType>CHOP</contextNetType> <contextNetType>ROP</contextNetType> <contextNetType>SHOP</contextNetType> <contextNetType>COP2</contextNetType> <contextNetType>VOP</contextNetType> <contextNetType>VOPNET</contextNetType> <contextNetType>DOP</contextNetType> </toolMenuContext> <toolSubmenu>fist Submenu</toolSubmenu> <toolSubmenu>second submenu</toolSubmenu> <script scriptType="python"><![CDATA[script for the tool]]></script> </tool> </shelfDocument>
Tags
Changing the default shelf tabs
Shelf sets, shelves, and tools from files later in the path will replace earlier definitions by the element’s name attribute. The file name of the shelf configuration file makes no different.
You can only replace a default shelf tab (by specifying a shelf tab with the same name in a user configuration file). It’s not possible specify that certain tools should be added or removed from a default shelf tab.
To modify one of the default shelf tabs:
-
Find the default shelf file containing the
<toolshelf>
element defining the tab, either in$HFS/houdini/toolbar/ShelfDefinitions.shelf
or$HFS/houdini/toolbar/ShelfDefinitions.master_shelf
. Open the file in a text editor. -
Select the
<toolshelf>
element defining the shelf tab and copy it to the clipboard. -
Start a new file, fill in the XML declaration and the
<shelfDocument>
element, and paste in the copied<toolshelf>
element. -
Remove or add
<memberTool>
elements to change which tools are on the shelf tab. -
Save the file somewhere in the Houdini
toolbar
path, for example$HOME/houdiniX.x/toolbar/mytools.shelf
.
Tips
-
To reload the shelf files without restarting Houdini, use hou.shelves.reloadFiles. To reload a single file, use hou.shelves.loadFile().