[Sidefx-houdini-list] hou equivalent of otinuse?

Rangi Sutton rangi.sutton at gmail.com
Fri Feb 13 00:56:42 EST 2009


Thanks Graham,

As simple as that eh?

When brain function improves I'll try this. It's all very roll your own
isn't it?

BTW, I'm trying to embed all the HDAs in use into the hip file. Is there
some way to achieve this? Seems like it'd be pretty useful for a bunch of
stuff.

Cheers,
r.


2009/2/13 Graham Thompson <captainhammy at gmail.com>

> I don't think there is available or planned carbon copy of otinuse but the
> info can pretty easily be retrieved yourself.
>
> Louis is on the right track but instead you need to check the node type for
> a definition (hdaModule is used for accessing the PythonModule section of a
> digital asset and most don't have them).  If you run
> hou.Node.type().definition() on a node and it is an instance of a digital
> asset it will return a hou.HDADefinition object.  That, combined with
> methods from the standard hou.Node object can be used to tell you everyting
> and more about assets in your scene.
>
> Something like this will give you a list of all the instances of digital
> assets.  You should then be able to process the list and get whatever you
> want.
>
> def findHDAs(root, hdas):
>    for child in root.children():
>      if child.type().definition() is not None:
>          hdas.append(child)
>          findHDAs(child, hdas)
>    return hdas
>
> my_assets = findHDAs(hou.node("/"), [])
>
>
>
> On Thu, Feb 12, 2009 at 8:46 PM, Louis Dunlevy <louisdunlevy at gmail.com
> >wrote:
>
> > Rangi Sutton wrote:
> > > Hey folks,
> > >
> > > the hscript otinuse command claims to be replaced by hou.NodeType and
> > > hou.HDADefinition .. but I can't see how?
> > >
> > > Is this just not implemented yet, or is it my fuzzy eyes?
> > >
> > > Beers,
> > > r.
> > > _______________________________________________
> > > Sidefx-houdini-list mailing list
> > > Sidefx-houdini-list at sidefx.com
> > > https://lists.sidefx.com:443/mailman/listinfo/sidefx-houdini-list
> > >
> > >
> > umm... don't quote me now..
> >
> > I guess you could check that hou.NodeType.hdaModule() is not empty.
> > You'd have to loop through all the nodes in the scene though. ugh..
> >
> > ummm.. maybe? Can't see anything else :-[
> >
> > L
>



More information about the Sidefx-houdini-list mailing list