[Sidefx-houdini-list] HDK OP in non 'Custom' tabmenu folder
Steve Gustafson
sgustafso at gmail.com
Mon Mar 21 00:52:11 EDT 2011
Yep. It's a bit unintuitive, but the tab menus can be tweaked with .shelf
files.
The shelf script Graham is talking looks something like this (for a custom
SOP named 'foo'):
file MyCustomSops.shelf:
<?xml version="1.0" encoding="UTF-8"?>
<shelfDocument>
<tool name="sop_myCustomSopTool" label="Foo" icon="SOP_foo">
<helpURL>operator:Sop/foo</helpURL>
<toolMenuContext name="viewer">
<contextNetType>SOP</contextNetType>
</toolMenuContext>
<toolMenuContext name="pop_viewer">
<contextNetType>SOP</contextNetType>
</toolMenuContext>
<toolMenuContext name="network">
<contextOpType>Sop/foo</contextOpType>
</toolMenuContext>
<toolSubmenu>MySubMenu</toolSubmenu>
<script scriptType="python"><![CDATA[import soptoolutils
soptoolutils.genericTool(kwargs, 'foo')]]></script>
</tool>
</shelfDocument>
Also note that this doesn't actually /remove/ your operator from the Custom
tab (I have no idea how to do that!). It's just creating an extra tool in
the tab menu of your choice that invokes a script to create your node.
On Sun, Mar 20, 2011 at 9:29 PM, Graham Thompson <captainhammy at gmail.com>wrote:
> You need to create a custom tool definition for your compiled
> operator. When you compile operators and load them into Houdini, it
> will create and use a super generic tool if none is found, hence the
> boring 'Custom' folder. By creating a custom tool definition you can
> control the menu placement as well as some other things. When
> creating a custom tool definition the tool name must be the operator
> name prefixed by the context in order for Houdini to associate a tool
> with an operator. Examples include "sop_star", "object_mycoolop",
> "dop_merge".
>
> For example, when I load one of my custom compiled object operators,
> Transform Switch, it appears in the 'Custom' folder and has no tab
> menu icon. If I add the tool for that operator to a shelf and then
> attempt to look at that tool I can see that in this case it is defined
> in $HOUDINI_TEMP_DIR/hfs7752-0.tmp. This isn't useful. However, I
> can modify this tool and save it somewhere. I can set the icon to be
> COMMON_switch and the Tab Submenu Path to be Utility. Now, if I save
> the tool to a .shelf file and it in a /toolbar folder somewhere in the
> $HOUDINI_PATH, when Houdini launches the tool will get picked up and
> all those settings I defined are reflected.
>
> On Sun, Mar 20, 2011 at 7:57 PM, Sebastian H. Schmidt
> <sebastian.h.schmidt at googlemail.com> wrote:
> > Hi Everybody,
> >
> > when compiling & using an HDK-Operator it shows-up in the 'Custom' folder
> of
> > the tabmenu, does somebody knows how to put it into a different folder ?
> > Thanks!
> >
> > Seb
> > _______________________________________________
> > Sidefx-houdini-list mailing list
> > Sidefx-houdini-list at sidefx.com
> > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> >
> _______________________________________________
> Sidefx-houdini-list mailing list
> Sidefx-houdini-list at sidefx.com
> https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
>
More information about the Sidefx-houdini-list
mailing list