[Sidefx-houdini-list] Python parameter join to next

Nick van Zutphen nvanzutphen at live.com
Sat Apr 7 15:30:05 EDT 2012


Hi!

I'm a bit confused here, if you create a set of parameters on an HDA and for a particular one toggle 'Join to next' this parameter will be on the same line as the next parameter, cosy joined together.
Now If I use python to add a set of parameters, this options doesn't seem to work.

Imagine that after this, another parameter is created, by similar code but of a different type. I would like that this parameter joins that parameter.
I think that it doesn't work because it tries to join a parameter that doesn't exist jet. Which makes me wonder, how does this work in the normal creation of parameters? Should I update an existing parameter? How do I do that?

A sniped of my code:

   stringTemplate = hou.StringParmTemplate(name='testName', label='Test Label', num_components=1)
   stringTemplate.setJoinWithNext(True)
   try:
       #Create parameter
       stringParm = node.addSpareParmTuple(stringTemplate,\
           in_folder=['Node Name'],\
           create_missing_folders=True)
   except:
       print 'Could not create string parameter'

Cheers,

Be Nick, be Nimble
----
http://www.nickvanzutphen.com/ngtl







More information about the Sidefx-houdini-list mailing list