p = nuke.Panel("Please select Input and Output Resolution")
vals = ['format1', 'format2', 'format3']
p.addEnumerationPulldown('Input Format', ' '.join(vals))
p.show()
val =  p.value('Input Format')
index = vals.index(val)print index

​

On Mon, Oct 24, 2016 at 4:33 PM, Daniel Hartlehnert <dah...@gmx.de> wrote:

> Hi,
>
> i created a nuke panel and added an enumeration pulldown:
>
> p = nuke.Panel("Please select Input and Output Resolution")
>     p.addEnumerationPulldown("Input Format“,format1 format2 format3)
>
> Now i want to know which index was selected by the user. If i use:
>
> p.value(‚Input Format‘)
>
> i only get the text of the entry that was selected, but not the index.
> I tried getValue, getIndex, index, but nothing worked.
>
>
> Daniel
>  _______________________________________________
> Nuke-users mailing list
> Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users
>



-- 


*Erik Johansson**Pipeline TD*


*Goodbye Kansas / Fido / Bläck*Rosenlundsgatan 40
118 53 Stockholm, Sweden
www.goodbyekansas.se
_______________________________________________
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to