monitor gui controls scripting question

Hi,

sorry for the dumb question maybe I’m missing something, but is there a way, in a monitor submission script to:

  • delete a control (a checkbox for example)
  • get the name of a checkbox
  • attach a control to a group (parent)

?

Thanks,
Gabor

Hi Gabor,
Maybe you can edit the Submission script in the Repository root directory.

In the py script you can do what you want.

I hope this help.

-Bill

Hi,
thanks for the feedback! Actually I’m editing the commandline submission py file to create a custom submission dialog. But for renderlayers list I would like to have a dynamically changing checkbox list, and for that I need to delete controls and append new controls to a parent layout. I looked in the docs, and other scripts but I couldn’t find any command.
Not an urgent thing, currently the user have to restart the dialog to refresh this list, and not just pressing a button. So it’s working, I was just curious if there’s a way…

Hi Gabor,

There isn’t an API function to remove controls. However, because everything is .NET under the hood, it is possible to add or remove controls from an existing row:

	testRow = scriptDialog.AddRow()
	scriptDialog.AddControl( "TextLabel", "LabelControl", "Enter Text Here", labelWidth, -1 )
	testControl = scriptDialog.AddControl( "TextBox", "TextControl", "Some Text", dialogWidth - labelWidth - 24, -1 )
	testRow.Controls.Remove( testControl )
	testRow.Controls.Add( testControl )

We’re accessing the Controls property of the row directly to remove and then re-add the control again.

Hope this helps!

  • Ryan