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

Graham Thompson captainhammy at gmail.com
Fri Feb 13 01:14:45 EST 2009


A fair amount of the more complex stuff is roll your own I guess.  Houdini
gives you the building blocks then you can build it up to whatever you want.

What you're looking to do is actually pretty easy.  After you have your list
of HDAs you can just iterate over them (or just do the embedding process in
the actual loop), grab their definition and do a
hou.HDADefinition.copyToHDAFile("Embedded").  Voila.  Your asset definition
is now embedded in your hip file and Houdini should be using the new
embedded definition.  Of course this will also embed any of the otls that
ship with Houdini so you can always check the library path from the
definition to see if it is coming from $HH/otl and if so ignore it assuming
you don't want to be embedding them as well.

On Thu, Feb 12, 2009 at 9:56 PM, Rangi Sutton <rangi.sutton at gmail.com>wrote:

> 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
> >
> _______________________________________________
> 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