[Sidefx-houdini-list] Setting Spare Parameter's Menu Script Dynamically from Python

Reza Ghobadinic rezagn at gmail.com
Wed Dec 8 01:06:09 EST 2010


Thanks, this works well :-)

On Wed, Dec 8, 2010 at 4:50 PM, Graham Thompson <captainhammy at gmail.com>wrote:

> Assuming you are using Houdini 11 there are a couple methods to deal with
> this.
>
> You can do it initially when creating a menu parameter:
>
> pt = hou.MenuParmTemplate("test", "Test", [],
> item_generator_script="things = ['a', 'A', 'b', 'B']\nreturn things")
>
> You can create the parameter template first then add the script and
> set its language:
>
> pt = hou.MenuParmTemplate("test", "Test", [])
> pt.setItemGeneratorScript("things = ['a', 'A', 'b', 'B']\nreturn things")
>
> If you are using Houdini 10 you are out of luck as menu parameters
> have virtually no working support in HOM.
>
>
> On Tue, Dec 7, 2010 at 9:29 PM, Reza Ghobadinic <rezagn at gmail.com> wrote:
> > Hi there,
> >
> > I need to use menu script instead of menu items for some spare parameters
> > that I make inside an output digital asset.
> > Is there a way to assign a python menu script to a newly created spare
> > parameter?
> >
> > It is possible to assign the callback script but couldn't find anything
> for
> > menu script!
> >
> > Any help will be appreciated.
> >
> > Cheer,
> >
> > --
> > Reza Ghobadinic
> >
> > "An idea not coupled with action will never get any bigger than the brain
> > cell it occupied"
> > _______________________________________________
> > 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
>



-- 
Reza Ghobadinic

"An idea not coupled with action will never get any bigger than the brain
cell it occupied"



More information about the Sidefx-houdini-list mailing list