Hi Frank,

Thanks for the answer. I didn't know about those kind of knobs and the
possibility to add them to a group/gizmo. I am trying to wrap my head
around them :)
I tried that code but, I don't know if I am doing something wrong, but I am
only able to set an already created dropdown while I would like to add and
remove items from an existing dropdown menu. Is that possible?

On Sat, Oct 6, 2012 at 2:02 AM, Frank Rueter <fr...@beingfrank.info> wrote:

>  use node.setValues() like this:
>
> n = nuke.selectedNode()
>
> n['myDropdownMenu'].setValues(['a', 'b', 'c'])
>
>
>  Where you put the code depends on how you want to use it. Possibly into
> the gizmo's "onCreate" knob?!
>
>
>  On 6/10/12 2:24 AM, Luca Fiorentini wrote:
>
> Hi,
>
> I am trying to populate a dropdown menu in a gizmo through python but with
> no luck.
> Imagine I have this function
>
> [CODE]def populate():
>     return 'first second third'[/CODE]
>
> how can I use it? Where should I put the call for the function?
> Thanks
>
>
> --
> *Luca Fiorentini - 3D Lighting Artist*
> My Showreel <http://www.vimeo.com/lucafiorentini/reel> - My 
> blog<http://lucafiorentini.wordpress.com>- My
> Flickr <http://www.flickr.com/photos/lucafiorentini>
>
>
>
> _______________________________________________
> Nuke-python mailing listnuke-pyt...@support.thefoundry.co.uk, 
> http://forums.thefoundry.co.uk/http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>
>
> _______________________________________________
> Nuke-python mailing list
> Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
>
>


-- 
*Luca Fiorentini - 3D Lighting Artist*
My Showreel <http://www.vimeo.com/lucafiorentini/reel> - My
blog<http://lucafiorentini.wordpress.com>- My
Flickr <http://www.flickr.com/photos/lucafiorentini>
_______________________________________________
Nuke-python mailing list
Nuke-python@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to