[Sidefx-houdini-list] Help With hou Module

Nix nix021 at yahoo.com
Wed Jan 30 17:59:14 EST 2008


How would create different types instead of an Integer
type...say like how would you create a 'Toggle'
instead?  I only partially understand the syntax of 
IntParmTemplate.  

Thanks, 
Nic


--- Robert Thomas <shinyary2 at gmail.com> wrote:

> I don't have any problem, so long as I give it the
> same label, regardless of
> whether or not autocreate is on.  I have access to
> all of the standard
> properties from within the parameters dialogue.
> 
> It is annoying that I don't have the ability to
> change the name of the
> folder (maybe there is a way and I just don't know
> how--or maybe there is
> some internal reason why I can't do this).
> 
> My Code:
> node = hou.node("obj").node("geo1")
> parm = hou.IntParmTemplate("test", "Test Parm", 1,
> (0,), 0, 10)
> node.addSpareParmTuple(parm, ("Spare",), True)
> parm = hou.IntParmTemplate("test02", "New Test
> Parm", 1, (0,), 0, 10)
> node.addSpareParmTuple(parm, ("Transform",), True)
> parm = hou.IntParmTemplate("test03", "Another Test
> Parm", 1, (0,), 0, 10)
> node.addSpareParmTuple(parm, ("Spare",), True)
> 
> This is after creating a "geo1" node at the object
> level, of course.
> 
> Robby
> 
> On Jan 24, 2008 4:39 PM, Andrew D Lyons
> <tstexture at gmail.com> wrote:
> 
> > This is fine if we want a folder for every parm,
> but what if we want
> > to add a few parms to a folder - at different
> times? What is the
> > syntax for adding a spare parm to an existing parm
> folder? When I
> > tried adding a parm to a new folder with
> autocreate, the folder names
> > were set to some default internal name and greyed
> out, and only the
> > folder labels were accessible. I'm guessing we
> need read write access
> > to the folder names...
> >
> > Thanks!
> >
> >
> > On 19/01/2008, Graham Thompson
> <gthompson at sidefx.com> wrote:
> > > You are in fact doing most everything correct,
> except the syntax about
> > > the folders you want them to be in. It expects a
> tuple.
> > >
> > > The proper syntax is in_folder=('Spare_Test', ).
> This will cause Houdini
> > > to create just the one folder with that name.
> > > If you had a folder 'Nested' inside that
> 'Spare_Test' then you would use
> > > ('Spare_Test', 'Nested')
> > >
> > > You can observe this by finding a parameter in
> one or more folders on a
> > > node and doing a hou.Parm.containingFolders.
> > >
> > > Hope that helps.
> > >
> > >
> > > Andrew D Lyons wrote:
> > > > I think you helped me find a bug.
> > > >
> > > > rop = hou.node("/out").createNode("comp",
> node_name="testrop",
> > > > run_init_scripts=False)
> > > >
> > > > parmtemplate = hou.StringParmTemplate(
> 'test_spare5', 'Test Spare5', 1
> > )
> > > >
> > > > parm = rop.addSpareParmTuple( parmtemplate,
> in_folder=('Spare_Test'),
> > > > create_missing_folders=True )
> > > >
> > > > For me these 3 lines create a parm called
> "Test Spare5" in a tree of
> > > > folders where there is a folder for every
> letter in "Spare_Test". The
> > > > parm is in the last 't' folder....
> > > >
> > > > --------------------------------------
> > > >
> > > > This creates a folder, but I couldn't find a
> way to get a parm into it
> > with HOM:
> > > >
> > > > rops = hou.node("/out").createNode("comp",
> node_name="testrop",
> > > > run_init_scripts=False)
> > > >
> > > > rops.addSpareFolder("Spare_Test",
> in_folder=(),
> > > > parm_name="test_spare",
> create_missing_folders=True)
> > > >
> > > > Maybe SESI can help (iwth a bugfix at least)
> > > >
> > > > Cheers
> > > >
> > > >
> > > >
> > > >
> > > >
> > > >
> > > > On 18/01/2008, Robert Thomas
> <shinyary2 at gmail.com> wrote:
> > > >
> > > >> Hi everyone,
> > > >>
> > > >> I'm trying to set up a Python script that
> will automatically add a
> > spare
> > > >> parameter to a folder called "Spare" on the
> current operator, both as
> > an
> > > >> exercise and as something to speed up my
> workflow, but I keep running
> > up
> > > >> against the incomplete documentation for the
> "hou" module.  So, I've
> > been
> > > >> trying to reverse engineer everything that is
> not documented, and
> > it's slow
> > > >> going.
> > > >>
> > > >> My current problem is that I cannot seem to
> create a default
> > parmTemplate
> > > >> object (since, naturally, there happens to be
> no constructor for that
> > > >> class--and of course no documentation).  My
> approach is to create one
> > of
> > > >> these and add it to the node using the
> "addSpareParmTuple()"
> > function, which
> > > >> appears to work the way I want it to if I
> extract the parmTemplate of
> > an
> > > >> already existing parameter.
> > > >>
> > > >> Incidentally, I'm not sure how to reference
> folders, so I don't know
> > how to
> > > >> stuff my new parameter into a folder using
> this function.
> > > >>
> > > >> Help!
> > > >>
> > > >> Thanks,
> > > >>
> > > >> Robby
> > > >>
> _______________________________________________
> > > >> 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
> > >
> >
> >
> > --
> > =======================================
> > Andrew D Lyons | Digital Artist |
> http://www.tstex.com
> > =======================================
> > _______________________________________________
> > 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
> 



      ____________________________________________________________________________________
Looking for last minute shopping deals?  
Find them fast with Yahoo! Search.  http://tools.search.yahoo.com/newsearch/category.php?category=shopping



More information about the Sidefx-houdini-list mailing list