I probably should have mentioned this before, but I forgot that it was there… in YourDeadlineRepository/scripts/General there’s a ScriptUIExample.py file, with examples of how to set up the various UI components. The sample combo box is: scriptDialog.AddControl( "ComboLabel", "LabelControl", "Select An Item", labelWidth, -1 )
scriptDialog.AddComboControl( "ComboBox", "ComboControl", "2008", ( "2007", "2008", "2009", "2010", "2011" ), dialogWidth - labelWidth - 24 - 200, -1 )
Here we can see that the values we have to choose from are given as a list of strings: ( “2007”, “2008”, “2009”, “2010”, “2011” ), and the argument before the list would be the item selected by default. (I think the combo boxes that are defined in another file are commonly used ones, and it’s not necessary to have them in another file.)
Another user previously asked me to set up source and output LUT controls… I haven’t tested this on the latest Deadline, but this is what I sent him:[code] scriptDialog.AddRow()
scriptDialog.AddControl( “SourceColorLabel”, “LabelControl”, “Source Color Space”, labelWidth, -1 )
scriptDialog.AddComboControl( “SourceColorComboBox”, “ComboControl”, “none”, (“none”,“Cineon”,“Alexa”,“sRGB”,“Rec709”,“custom gamma”), dialogWidth - labelWidth - 24 - 200, -1 )
scriptDialog.AddControl( “SourceGammaLabel”, “LabelControl”, “Gamma”, 50, -1 )
scriptDialog.AddControl( “SourceGammaBox”, “TextControl”, “”, 100, -1 )
scriptDialog.EndRow()
scriptDialog.AddRow()
scriptDialog.AddControl( "DestColorComboLabel", "LabelControl", "Dest Color Space", labelWidth, -1 )
scriptDialog.AddComboControl( "DestColorComboBox", "ComboControl", "none", ("none","Cineon","Alexa","sRGB","Rec709","custom gamma"), dialogWidth - labelWidth - 24 - 200, -1 )
scriptDialog.AddControl( "DestGammaLabel", "LabelControl", "Gamma", 50, -1 )
scriptDialog.AddControl( "DestGammaBox", "TextControl", "", 100, -1 )
scriptDialog.EndRow()[/code]Then, in SubmitDraftJob, you'd add:[code]
args.append( 'inColor="%s" ' % scriptDialog.GetValue( "SourceColorComboBox" ) )
args.append( 'inGamma="%s" ' % scriptDialog.GetValue( "SourceGammaBox" ) )
args.append( 'outColor="%s" ' % scriptDialog.GetValue( "DestColorComboBox" ) )
args.append( 'outGamma="%s" ' % scriptDialog.GetValue( "DestGammaBox" ) )[/code]In __main__, don't forget to add "SourceColorComboBox","SourceGammaBox","DestColorComboBox","DestGammaBox" to settings, so that you can have them be sticky as well.
In your Draft script, the selected LUT would come in as a string which you would then use in a conditional statement as you expected. I would recommend not adding the gamma fields to the expectedTypes dictionary, so that they can be treated as optional.
Let me know if this is sufficient assistance on this, or if you have more questions.