[Sidefx-houdini-list] Hom - HDA - Copy Defaults from Node

Sandy Sutherland sandy.maillists at gmail.com
Tue Feb 23 12:52:52 EST 2016


OK - seem to have found a solution to this - code below, if anyone else
might need this - note that our parameter is called shotFile.

###############################
        parm_group = self.node.parmTemplateGroup()
        sfl = parm_group.find("shotFile")
        mytuple =
('`chs("../ABC_ShotOutput1/alembicPath")+"/"+chs("AssetName")`_`chs("NameSpace")`.abc',)
        sfl.setDefaultValue(mytuple)
        parm_group.replace("shotFile", sfl)

p.set('`chs("../ABC_ShotOutput1/alembicPath")+"/"+chs("AssetName")`_`chs("NameSpace")`.abc')
        definition = self.node.type().definition()
        definition.setParmTemplateGroup(parm_group)

On Tue, Feb 23, 2016 at 3:12 PM, Lars van der Bijl <com48com at gmail.com>
wrote:

> node.type().definition().updateFromNode(node)
>
> On Tue, Feb 23, 2016 at 12:53 PM, Sandy Sutherland <
> sandy.maillists at gmail.com> wrote:
>
> > Hi all,
> >
> > I am making a tool that checks at the otl files here for a particular
> > project,  The idea is to make sure there are no explicit paths set, and
> if
> > found, fix them.  I however have found a path that once I fix, only gets
> > set on HDA save, if I run Copy Defaults from Node, from the gear icon on
> > the Type Properties parameter tab.
> >
> > Is there a command I can use to do this from Python?
> >
> > I have looked here -
> > http://www.sidefx.com/docs/houdini15.0/hom/hou/HDAOptions, but cannot
> see
> > anything for what I need.
> >
> > Thanks -
> >
> > Sandy
> > _______________________________________________
> > 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