Deadline 6 Script problem

Hi everyone,

after switching to Deadline 6, I encountered that several of our In-House scripts wouldn’t work anymore.
I’ve narrowed the problem down to the conversion of a python list to an Array for a dropdown menu in a custom UI.
Here’s the original code (simplified):

from System import Array

fps_choice = ["25.0", "29.97", "30.0"]
fps_array = Array[str](fps_choice)
scriptDialog.AddComboControl( "FPS", "ComboControl", "25.0", fps_array, 200, -1 )

whereas this works:

scriptDialog.AddComboControl( "FPS", "ComboControl", "25.0", ("25.0", "29.97", "30.0"), 200, -1 )

Another problem I’m having with this script is that the radio buttons don’t work properly any more:

scriptDialog.AddControl( "FromDeptLabel", "LabelControl", "Department:", labelWidth, -1 )
scriptDialog.AddRadioControl( "FromDept3D", "RadioControl", True, "3D", "DeptGroup", 100, -1 )
scriptDialog.AddRadioControl( "FromDept2D", "RadioControl", False, "2D", "DeptGroup", 100, -1 )
scriptDialog.AddRadioControl( "FromDeptEdit", "RadioControl", False, "Edit", "DeptGroup", 100, -1 )

The labels “3D”, “2D” and “Edit” for each radio button don’t show up any more, just the buttons themselves.
Is there any documentation on the changes in the scripting API for Deadline 6?
Best regards,

Dirk

Hey Dirk,

There were a few changes that were necessary due to the removal of IronPython. This array issue wasn’t even on our radar, since with IronPython, you could have just converted the list to a tuple like this:

fps_array = tuple(fps_choice)

Is the workaround you found to deal with the lists for the combo boxes sufficient? Or do you still need to generate the list for the combo box ahead of time? If you still need to generate the list, you can just pass it directly, like this:

fps_choice = ["25.0", "29.97", "30.0"]
scriptDialog.AddComboControl( "FPS", "ComboControl", "25.0", fps_choice, 200, -1 )

The RadioButton issue, unfortunately, is a bug, so thanks for bringing it to our attention! The problem is that the text simply doesn’t get set for the control. However, because the AddRadioControl function returns the control, you can do this for now as a workaround:

scriptDialog.AddControl( "FromDeptLabel", "LabelControl", "Department:", labelWidth, -1 )
scriptDialog.AddRadioControl( "FromDept3D", "RadioControl", True, "3D", "DeptGroup", 100, -1 ).setText("3D")
scriptDialog.AddRadioControl( "FromDept2D", "RadioControl", False, "2D", "DeptGroup", 100, -1 ).setText("2D")
scriptDialog.AddRadioControl( "FromDeptEdit", "RadioControl", False, "Edit", "DeptGroup", 100, -1 ).setText("Edit")

You can see that we’re just setting the text manually at the end of each AddRadioControl call. Hopefully this works for now. We’ll definitely get this bug fixed in the next release.

Cheers,

  • Ryan

Ok, works now, thank you very much!!

I am using Deadline 6.2 and want to know how to arrange a set of radio buttons vertically. Since the change to 6.2, you have to declare the radiobuttons as part of a group.
If anyone can point me to how to achieve a vertical radio button group in Deadline 6.2, I would appreciate it.

More than likely, its very simple. :smiley:

found it:

Deadline-6.2.0.32-Scripting-Reference.pdf, page 200.

I tried altering the width and height, but the buttons are still horizontal. Pointers please.

I bloody knew it would be simple! A small amount of deliberation has yielded a result I think is what is required by this control.

As long as the radio control is part of the same unique radio group, then it does not matter how they are called:

Horizontal layout:

scriptDialog.AddRow()
scriptDialog.AddRadioControl("RadioOne", "RadioControl", True, "Rad 01", "RadioGroup", 100, -1, "Potato" )
scriptDialog.AddRadioControl("RadioTwo", "RadioControl", False, "Rad 02", "RadioGroup", 100, -1, "Potarto" )
scriptDialog.AddRadioControl("RadioThree", "RadioControl", False, "Rad 03", "RadioGroup", 100, -1, "Tomato" )
scriptDialog.AddRadioControl("RadioFour", "RadioControl", False, "Rad 04", "RadioGroup", 100, -1, "Tomarto" )
scriptDialog.EndRow()

Vertical layout:

scriptDialog.AddRow()
scriptDialog.AddRadioControl("RadioVer1", "RadioControl", True, "RaVer 01", "RadioGroupVer", 100, -1, "Clam" )
scriptDialog.EndRow()

scriptDialog.AddRow()
scriptDialog.AddRadioControl("RadioVer2", "RadioControl", True, "RaVer 02", "RadioGroupVer", 100, -1, "Chowder" )
scriptDialog.EndRow()

scriptDialog.AddRow()
scriptDialog.AddRadioControl("RadioVer3", "RadioControl", True, "RaVer 03", "RadioGroupVer", 100, -1, "Chowder" )
scriptDialog.EndRow()

If you knew this already, bonzar, but if you did not know, then I hope you find this and it helps. What also helps is READING THE MANUAL!!! Hahahahahahah :mrgreen: