[Sidefx-houdini-list] setting default values of HDA
sandy.maillists at gmail.com
Wed Nov 9 09:26:58 EST 2016
Just had to set this up myself for a tool I am creating here - the function
snippet is -
def _set_defaults(node, p, value):
Function to set Parm defaults in an HDA
:param node: The node to set it on
:param p: The Parm in question
:param value: The Value to set the default to
deff = node.type().definition()
parm_group = deff.parmTemplateGroup()
parm_template = parm_group.find(p)
On Wed, Nov 9, 2016 at 2:15 PM, Martijn Grootendorst <martinuz at gmail.com>
> found it:
> in Type properties/ the little gear top right in existing parameters
> column: "copy defaults from node"
> sweet! :)
> On Wed, Nov 9, 2016 at 3:07 PM, Edward Lam <edward at sidefx.com> wrote:
> > I think the only alternative is to only use _all_ the parameter values of
> > your HDA node that you opened the Type Properties from. To do this for
> > HDA in the Type Properties dialog, go to the Save tab. Turn off Save
> > Defaults as Initial Parameters.
> > Turning this off is a bit dangerous though as the setting lives with the
> > HDA and you have to be careful about keeping the parameter values of your
> > HDA "clean" whenever you save or else you inadvertently change the
> > parameter values whenever creating a new node of your HDA type.
> > Cheers,
> > -Edward
> > On 09/11/2016 8:46 AM, Martijn Grootendorst wrote:
> >> Hi,
> >> I'm having some fun with creating my own HDA and I was wondering if
> >> is an easier way to set default values of the asset.
> >> Ideally I would like a shelf button or maybe even in a right-click menu
> >> create/set the default values from the current values.
> >> This is already possible for 1 parameter at a time (right-click in a
> >> field/ Make Current Value Default), but with an increasing amount of
> >> parameters this becomes more difficult to manage.
> >> I know python (but I've only had to use it in maya :) so any guidance
> >> this direction would be great!
> >> thanks,
> >> Martijn
> >> _______________________________________________
> >> 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
More information about the Sidefx-houdini-list