[Sidefx-houdini-list] Creating a shelf tool for custom otl

Sam Swift-Glasman glassman3d at gmail.com
Wed Jul 12 06:34:45 EDT 2017


Shouldn't be too bad in python

A few thoughts:
hou.ui.displayMessage()
hou.ui.selectNode() - selcet node

hou.selectedNodes() - returns an orderd list of the selected nodes in your
scene

createInputNode(input_index, node_type_name, node_name=None,
run_init_scripts=True,load_contents=True, bool exact_type_name=False)
is a handy function for setting input nodes to the current node by index

when i get home later can give you a more detailed response
cheers


On Wed, Jul 12, 2017 at 11:07 AM, Tony Atherton <tony_atherton at hotmail.co.uk
> wrote:

> Hi,
>
>
> I've got a custom otl which has 3 inputs. I want to create a shelf tool
> which displays custom prompts to the user and gets them to select three
> different sop nodes, which I can connect as inputs in to a new instance of
> my otl. I've managed to get this to work using the OPbindings file, but if
> I put just my otl information in an OPbindings file in my ~/houdini16.0
> directory it breaks things in Houdini (various handles for nodes etc), so
> unless I take a complete copy of this file from the install directory to my
> ~/houdini16.0 directory and append my otl information to it, it doesn't
> work . This method is not ideal as I'm in a production environment and I
> don't really want to have to update this file every time there's a new
> build installed.
>
>
> I know there's got to be a python way of doing this and I have found the
> hou.sceneViewer.selectGeometry function, which seems like it will do a lot
> of the work. I would still need to build some code around this though to
> connect the nodes, check for errors etc., so I'm wondering if anyone could
> offer any advice before I spend an afternoon writing lots of code which I'm
> guessing someone from sidefx must have already written somewhere and I'm
> just missing.
>
>
> Cheers,
>
> Tony
> _______________________________________________
> 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