...
At last count Qube! UI ships with 33 submission plugins that you can find in the plugins/submission
directory under the application directory (or under QubeUI\bin
on Windows). Looking through the submission dialogs for each type in the UI and then reading the corresponding section of it's plugin file is a good way to quickly find how to do what you need in a particular situation.
Table of Contents |
---|
Submission plugin terminology
Field
See parameter.
Page
Submission plugin pages are used to group related parameters. Only a single page is shown by the submission dialog at one time.
Parameter
A submission plugin is built up of multiple parameters and is the main mechanism for getting input from the user. Some examples of submission parameters could be an output directory path, an image file type, or a verbosity flag. The terms parameter and field are synonymous and are used interchangeably in this documentation.
Creating a new submission type plugin
...
The process is as follows:
- Add the submission type.
- Add a new page.
- Add parameters.
- Override defaults for fields in the Qube Basics page.
- Set the command template.
1. Add the submission type
...
Code Block | ||
---|---|---|
| ||
# Create a new submission type add_submission_type('Make proxy', short_name='Make Proxy', type="makeProxy", has_range=False, can_batch=False, thread_control='all', prototype="cmdline", group="Pipeline") |
Check the documentation for add_submission_type()
for information on the command's arguments.
...
After you add a page it becomes current, every field that follows is added to that page until you add a new one. We'll add a Source Path
field parameter using add_field().
Code Block | ||
---|---|---|
| ||
add_field("Source Path", type="path", required=True, destination="package.sourcePath") |
...
Let's keep going and make a new Output page and parameter for the output path.
Code Block | ||
---|---|---|
| ||
add_page("Output")
add_field("Destination Path",
type="path",
required=True,
destination="package.destinationPath")
|
First we make a new page for our output parameters. The Destination Path
parameter is nearly identical to our Source Path
parameter so we'll skip explaining it the explanation and move on.
Code Block | ||
---|---|---|
| ||
add_field("ProxyScale", default=50, min=1, max=100, required=True, destination="package.proxyScale") |
...
The command template works in the same way, where the parameter names act as the keys to the dictionary. In our example command template we make a new directory and then run magick
to resize the images.
Submission Plugin Functions
...
Argument | Type | Default | Comment |
---|---|---|---|
type | string | The type identifier for this submission plugin. The type identifier is used, among other reasons, to determine a job's submission type which allows the UI to open the correct submission dialog upon job resubmission. | |
prototype | string | cmdline | The Qube! submission prototype. |
short_name | string | An alternative, shorter name for the submission plugin type, used when UI space is tight. | |
has_range | boolean | False | Whether the plugin should display frame range related fields in the Qube Basics page. |
thread_control | string | An empty string or "false" hides the Threads per instance and Instances use all cores fields from the Qube Basics page. Any other value that is not "all" will hide the Instances use all cores field only. | |
can_pad_frames | boolean | False | A value of True will include a Frame Padding field in the Qube Basics page. |
can_batch | boolean | False | Allows generation of partitions or chunks in the submitted job. |
pre_show_validate | Python function | on_pre_show_validate | This Python function is called before pre_dialog and should return a boolean that determines whether the submission dialog should be shown. |
pre_dialog | Python function | on_pre_dialog | This Python function is called immediately before the submission dialog is shown. |
post_dialog | Python function | on_post_dialog | This Python function is called after the job is created and the submission dialog is closed but before submission. |
post_submit | Python function | on_post_submit | This Python function is called after the job is submitted. |
install | Python function | install | This Python function is called when selecting the corresponding menu item in the File->Install App UI menu. |
...