Shotgun Nuke Quickreview API reference, v1.3.2

The tk-nuke-quickreview app adds a custom gizmo to the shotgun node menu in Nuke.

Via a user interface, the user can create a Shotgun Version.

The following items are configurable via the UI:

  • The name of the Version.

  • The entity link and task that should be associated with the Version.

  • Description.

  • Frame range to submit.

  • Whether to add the created Version to a playlist.

During the submission process several things happen:

  • A quicktime file with slates and burnins is rendered out by Nuke

  • A Shotgun Version entity is created

  • The quicktime is uploaded to Shotgun and deleted from disk.

Several aspects of the process are customizable via the following Hooks:

Controlling naming and formatting

class tk_nuke_quickreview.base_hooks.ReviewSettings(parent)[source]

This hook allows a user to customize and override default metadata, default values as well as controlling the format for the uploaded media.

get_burnins_and_slate(sg_version_name, context)[source]

Returns the burnins and slates that should be rendered into the review submission.

Should return a dictionary with the following keys and format:

{
    "slate": ["Name: lighting.v003.nk", "Date: 12 October 2001", "..."]
    "top_right": "Top right burnin"
    "top_left": "Top left burnin"
    "bottom_left": "Bottom left burnin"
}

Note

The bottom right burn-in is used as a frame counter and is controlled by the app.

Parameters:
  • sg_version_name (str) – The name of the shotgun review version

  • context (Context) – The context associated with the version.

Returns:

Dictionary with burn-ins and slate strings

get_title(context)[source]

Returns the title that should be used for the version. This value is presented in the UI to the user as a default value which can be manually updated.

Parameters:

context (Context) – The context to be associated with the version.

Returns:

Version title string.

get_resolution()[source]

Returns the resolution that should be used when rendering the quicktime.

Returns:

tuple with (width, height)

setup_quicktime_node(write_node)[source]

Allows modifying settings for Quicktime generation.

Parameters:

write_node – The nuke write node used to generate the quicktime that is being uploaded.

Adding events and automation

class tk_nuke_quickreview.base_hooks.ReviewEvents(parent)[source]

This hook exposes main events in the review workflow, allowing for various data injections and post processing.

before_version_creation(sg_version_data)[source]

Called before the version entity is created, allowing for injections of additional metadata or fields before anything has been added to shotgun.

Parameters:

sg_version_data (dict) – Shotgun version dictionary

Returns:

Modified Shotgun version dictionary

after_version_creation(sg_version_id)[source]

Called after the version entity has been created, but before any media upload has taken place.

Parameters:

sg_version_id (int) – The associated version id

after_upload(sg_version_id)[source]

Called after the media has been uplaoded to Shotgun.

Parameters:

sg_version_id (int) – The associated version id