Hi Igor, cool, this works. I had to do some minor tweak. f += i.name() + ’ '
I wanted to extend this a little to also include the widht and height numbers after each format name. So i tried: f += i.name() +’ ' +str(i.width()) + 'x' +str(i.height()) +’ ' But the space between the name and width creates a new entry in the panel. Obviously, blanks in the enumeration panel do that. How can i avoid that? I know i can write ’_’ instead, but with a blank it would be a bit more readable. Daniel > Am 23.10.2016 um 13:49 schrieb Igor Majdandzic <subscripti...@badgerfx.com>: > > Hey Daniel, > > try this: > > f = '' > for i in nuke.formats(): > f += ' ' + i.name() > dict = {'formats': f} > p = nuke.Panel("Resolutions") > p.addEnumerationPulldown("Format",dict.get('formats')) > p.show() > > Cheers > > Am 23.10.2016 um 10:46 schrieb Daniel Hartlehnert: >> Hi, >> >> i want to create a panel that has the format pulldown from the current nuke >> script in it. >> So i know how to create a panel: >> >> p = nuke.Panel("Resolutions") >> >> And then add a pulldown menu for it: >> >> p.addEnumerationPulldown("Format","1 2 3 4 5“) >> >> But how do i add a pulldown, that has all the current scripts formats in it? >> Would i have to basically copy all entries from nuke.formats() into my >> pulldown one by one? >> Or is there a simpler way, like creating the format pulldown from the >> project settings with a built-in function? >> >> Daniel_______________________________________________ >> Nuke-users mailing list >> Nuke-users@support.thefoundry.co.uk >> <mailto:Nuke-users@support.thefoundry.co.uk>, >> http://forums.thefoundry.co.uk/ <http://forums.thefoundry.co.uk/> >> http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users >> <http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users> > > -- > -------------- > Igor Majdandzic > Compositing Supervisor/TD > > @Chimney Frankfurt > _______________________________________________ > 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
_______________________________________________ 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