[Sidefx-houdini-list] Houdini problem with edit parameter interface for group "BUTTONS_reselect"

Olivier Jeannel facialdeluxe at gmail.com
Fri Sep 22 12:07:06 EDT 2017


Thank you Jordan :) Python is a bit over my scope atm but thank's for
putting such a detailled explanation !

2017-09-20 16:49 GMT+02:00 Jordan Walsh <jordan.h.walsh at gmail.com>:

> The other option is to make the references point back to the original
> node.. if you dont want to promote the other parms
>
> eg, you can take the kwards node and go relative to it.
> So kwargs['node'] gives you the node you are running the script from.
> kwargs['node'].node('..') gives you the parent node
> kwargs['node'] .node('./someOtherNode') will give you a child node called
> someOtherNode that is within the subnet.
>
> The new Action Button code would now be:
>
> import soputils
> kwargs['geometrytype'] =
> kwargs['node'].node('./group1').parmTuple('grouptype')
> kwargs['inputindex'] = 0
> kwargs['ordered'] = kwargs['node'].node('./group1').parm('ordered').eval()
> soputils.selectGroupParm(kwargs)
>
> On another point, this is actually the preferred method of getting to nodes
> within your hda if you have a geometry parameter as it supports relative
> paths.
> Eg, if you had an object merge in your HDA and you promoted the object path
> you would want to do:
>
> n = kwargs['node']
> myNode = n.node(n.parm('objpath1').eval())
>
> not simply:
> myNode = hou.node(kwargs['node'].parm('objpath1').eval())
>
> That way if objpath1 evals to '../../mynode' it will get the correct
> relative path and not error.
>
> Jordan
>
> On 19 September 2017 at 15:20, Olivier Jeannel <facialdeluxe at gmail.com>
> wrote:
>
> > Genius !
> > Thank's a lot !
> >
> > 2017-09-19 15:58 GMT+02:00 <b.fx at free.fr>:
> >
> > > Hello Olivier,
> > >
> > > Take a look at the script action. It is automaticly created when you
> > > promote the baseGroup parameter. Assuming you promote your parameter
> > "from
> > > node" or by "drag and drop".
> > >
> > > Edit the HDA parameter interface, select the base group parameter and
> > look
> > > for the tags parms. Look at the script action.
> > > It look for the "grouptype" parm and "ordered" parm parm by default.
> > > Promote those twoo parameters it will work. If you change the
> parameters
> > > names you will have to edit the script_action according to the new
> names.
> > >
> > > hope this help
> > > françois
> > >
> > >
> > >
> > > ----- Mail original -----
> > > De: "Olivier Jeannel" <facialdeluxe at gmail.com>
> > > À: sidefx-houdini-list at sidefx.com, softimage at listproc.autodesk.com
> > > Envoyé: Mardi 19 Septembre 2017 14:09:43
> > > Objet: [Sidefx-houdini-list] Houdini problem with edit parameter
> > interface
> > > for group "BUTTONS_reselect"
> > >
> > > Hi quiet list :)
> > >
> > > I've made a super simple HDA where a group of point needs to be
> selected
> > to
> > > create a group.
> > >
> > > In edit "parameter interface" I exposed the Base Group, but the little
> > > arrow "BUTTONS_reselect", when is clicked, gives this error message :
> > >
> > > Traceback (most recent call last):
> > >   File "Parameter Scripted Action", line 4, in <module>
> > > AttributeError: 'NoneType' object has no attribute 'eval'
> > >
> > > I guess there's something to tweak in the tab "action button" ?
> > >
> > > If someone can help..
> > > _______________________________________________
> > > 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
> > >
> > _______________________________________________
> > 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
>



More information about the Sidefx-houdini-list mailing list