Python Tools

Purpose

A suite of stand-alone python tools were designed to meet the specific needs of Artists, Production, Supervisor, Technical and/or Render teams that could not be easily integrated with any of the existing toolsets.

Caution

While stand-alone tools can provide an easy fix to certain solutions, it is advised to use them sparingly for the following reasons :

  • They need to be constantly maintained, updated and deployed separately
  • They must always be kept up to date with the changes in our main Pipeline Tools
  • They might be prone to human-errors or misuse by certain users if proper validations are put in place
  • They can cause critical loopholes in the pipeline if not properly integrated with the CGIF and Kitsu database

Design

The design of all such tools is simple and straightforward. The UI designed in such a way that any new user should understand its function without needing any guidance or documentation.
However, behind the simple appearances, the tools have a list of in-build checks and validations in place to avoid any common errors or misuse.

UI : Code

All stand-alone tools mentioned in this documentation are designed using Python, relying on the customtkinter module for developing the UI.
The most common inputs available to the user are as follows :

  • Action :
    A dropdown menu with a list of all available actions in the current tool.
    If action is not selected, there will be an error.
  • Project :
    A dropdown menu with a list of all projects that are supported by the tool. It is possible to convert this dropdown menu to a text field, but since typing the entire project name can be prone to typos and errors, it was decided to list it out as menu instead.
    If project is not selected, there will be an error.
  • Episode :
    A text field for short name of the episode on which the selected action will be performed. Episode code is acceptable only in the format e000. A simple placeholder text is visible in the empty text field to make the acceptable input format clear to the user.
    Currently supports single entries only.
    If episode code is not specified, there will be an error in most actions. However some actions support empty episode codes.
  • Shot :
    A text field for the list of shot numbers on which the selected action will be performed. Short numbers are acceptable only in the format 1,2,3,4,5. A simple placeholder text is visible in the empty text field to make the acceptable input format clear to the user.
    If at least one shot number is not specified, there will be an error in many actions. However some actions support empty shot list.
  • Submit :
    The final button to submit the form data to the script and perform the selected action.
  • Message Box : A read-only text box to display progress and report of the action being performed. It is mostly used to communicate to the user whether the script was executed successfully or not. If the script failed, the user is also notified an error code and/or an error message for debugging purposes.

UI : Design

This is how the UI looks for the Cache Export Submitter tool.

Cache Export Submitter - User Interface

Cache Export Submitter - User Interface


These are a few common errors for the Cache Export Submitter tool.

Cache Export Submitter - Error Messages

Cache Export Submitter - Error Messages


Deployment

Most stand-alone tools are wrapped into a self-contained, portable directories that can simply be copied and pasted to any new system. Some of the main components are as follows :

  1. The root directory contains a *_launcher.bat file to launch the tool.
  2. The dependencies directory is a collection of all external dependencies that might be required for the tool to function independently. This generally include a self-contained, portable version of Python with all required libraries included, and a version of Rclone along with the required configuration in a .conf file.
  3. The update directory contains a single *_update.bat file which is called by the launcher.bat file to pull any necessary updates from the CGIF server. By pulling the updates right before launching the tool ensures that the user is always using the latest version of the tool.
    Updates are pulled using the Rclone sync command.

Note

Stand-Alone tools generally do not rely on the Internet to install any dependencies or libraries. All required files are packed in the dependencies folder as mention above. Any required updates to the tool might be accessed from the CGIF server.

  1. The scripts directory includes all the script files required for the specific tool, including an *_app.py file which defines the UI configuration using the customtkinter modules. While the above mention directories might be common across various tools, the scripts directory is unique to each tool.

Examples

The open files for these tools are saved at :

Server Path
\\path\to\py\stand-alone-tools

Links

Explore the following sections to learn more: