Versions Compared

    Key

    • This line was added.
    • This line was removed.
    • Formatting was changed.

    ...

    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.

    Image Added

    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.

    Image Added

    Creating a new submission type plugin

    ...

    The process is as follows:

    1. Add the submission type.
    2. Add a new page.
    3. Add parameters.
    4. Override defaults for fields in the Qube Basics page.
    5. Set the command template.

    1. Add the submission type

    ...

    Code Block
    languagepy
    # 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
    languagepy
    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
    languagepy
    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
    languagepy
    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

    ...

    ArgumentTypeDefaultComment
    typestring 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.
    prototypestringcmdlineThe Qube! submission prototype.
    short_namestring An alternative, shorter name for the submission plugin type, used when UI space is tight.
    has_rangebooleanFalseWhether the plugin should display frame range related fields in the Qube Basics page.
    thread_controlstring 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_framesbooleanFalseA value of True will include a Frame Padding field in the Qube Basics page.
    can_batchbooleanFalseAllows generation of partitions or chunks in the submitted job.
    pre_show_validatePython functionon_pre_show_validateThis Python function is called before pre_dialog and should return a boolean that determines whether the submission dialog should be shown.
    pre_dialogPython functionon_pre_dialogThis Python function is called immediately before the submission dialog is shown.
    post_dialogPython functionon_post_dialogThis Python function is called after the job is created and the submission dialog is closed but before submission.
    post_submitPython functionon_post_submitThis Python function is called after the job is submitted.
    installPython functioninstallThis Python function is called when selecting the corresponding menu item in the File->Install App UI menu.

    ...