Skip to content

A Shotgun Pipeline Toolkit App that implements a custom exporter in Hiero

License

Notifications You must be signed in to change notification settings

nfa-vfxim/tk-hiero-export

 
 

Repository files navigation

GitHub release (latest by date including pre-releases) GitHub issues

Shotgun Export Icon

App that adds Shotgun awareness to Nuke Studio's sequence export. It adds a new processor that will use the configuration to determine paths for Nuke scripts and plates. It also will use the tags to determine Shotgun Shot status and task templates to create/update the Shots in Shotgun.

Supported engines: tk-hiero, tk-nuke

Requirements

ShotGrid version Core version Engine version
- v0.18.124 -

Configuration

Strings

Name Description Default value
default_task_template The default shot task template to use when the app is creating new shots in Shotgun. This setting is presented in the Custom Shotgun Export UI and you can change it prior to running the export if you want. 2D Shot
default_task_filter A filter that will return the task in the Shot that publishes will be registered against. This value must be a valid filter that can be passed to the find method of the Shotgun api, without a condition for entity (a value linking entity to the Shot will be added at publish time). If the filter contains a condition in the form ['step.Step.code', 'is', VALUE], then whatver VALUE is will be used by the default translate_template hook as the value to use when expanding {Step} in the publish templates. If the filter results in a single task, then any publishes created by the app will be associated with that task. Otherwise they will only be associated with the Shot. [['step.Step.code', 'is', 'Comp']]

Tank types

Name Description Default value
audio_published_file_type The string value of the Published File/Tank Type used for published audio. Hiero Audio
plate_published_file_type The string value of the Published File/Tank Type used for published plates. Hiero Plate
nuke_script_published_file_type The string value of the Published File/Tank Type used for Nuke scripts. Nuke Script

Lists

Name Description Default value
nuke_script_toolkit_write_nodes A list of dictionaries in which you define the Sgtk write nodes that will be added to the published nuke scripts. Each dictionary entry needs to have the following keys: channel - the value for the 'output' knob in the created node. name - the profile name of the write node to create.
custom_template_fields A list of custom strings to add to Hiero's resolver. Each item is a dictionary specifying the keyword to be replaced and a description for that keyword that will show up in the tooltip for the export tree. A valid entry will look like '{keyword: a_keyword, description: This is a keyword}'. Each keyword needs to be translated to a resolved string by the resolve custom strings hook. []

Hooks

Name Description Default value
hook_translate_template Called when a template needs to be translated into a Hiero style replacement string. First argument is the template to translate. Second argument is a string describing the type of template being translated. The return value is the translated string. hiero_translate_template
hook_upload_thumbnail Called when a thumbnail needs to be uploaded to Shotgun for a Hiero source. First argument is a dictionary that is the Shotgun entity to upload for. The second argument is the Hiero Source to get the thumbnail from. The third argument is the Hiero TrackItem that the source was pulled from. The TrackItem may be None when the thumbnail does not correspond to an item from a timeline. hiero_upload_thumbnail
hook_get_shot Called to return the shot to update cut information for. The first argument is the Hiero export Task object. The second argument is the hiero.core.TrackItem that is driving shot creation. The third argument is a data dictionary that can be used to pass data between different calls to shot create.
The return value is a data dictionary for the shot, whose id will be updated. Cut information will be merged into this dictionary before Shotgun update is called on the shot. The default implementation creates or looks up a sequence named after the Hiero Sequence being exported and links that to the shot via the sg_sequence field.
hiero_get_shot
hook_pre_export Called prior to starting shotgun's shot processor. It can be used to clear out caches and do other specific initializations. hiero_pre_export
hook_resolve_custom_strings Called when resolving custom items added to the Hiero resolver via the custom_template_fields setting. The first argument is the keyword being resolved and the second argument is the Hiero task being run.
The return value is the resolved string value for the keyword.
hiero_resolve_custom_strings
hook_get_quicktime_settings Called when generating the default settings for creating a quicktime. The argument is a boolean that is True when the resulting quicktime is only for upload to Shotgun and False when the settings are used for a default Quicktime transcode.
The return value is a tuple of two items. The first is a string that is the file_type for the Nuke write node that will be generated. The second is a dictionary where the keys are knob names for the write node, and the values are the corresponding node values.
hiero_get_quicktime_settings
hook_update_version_data Called before creating a Version in Shotgun for a transcode. The default values for the version will already be filled in in the version_data dictionary. Modify this dictionary to change what will be passed as an argument to the Shotgun API create call. hiero_update_version_data
hook_post_version_creation Called after the Version entity is created. The hook is provided the new entity data dictionary which will include the ID number of the entity that was created. hiero_post_version_creation
hook_get_extra_publish_data Called before creating a PublishedFile in Shotgun for a transcode. This hook should return None if there is no extra info to associate with the published file, or a dictionary that is compatible with the Shotgun API's update method. hiero_get_extra_publish_data
hook_customize_export_ui Called during initialization of the export UI. Provides methods for defining custom UI properties on presets, initializing and injecting custom widgets into the exporter, and setting up custom widgets to make use of property UI widgets. hiero_customize_export_ui
hook_update_shot Called during SG shot processing. Provides methods for managing if and how the Shot's entity in updated, and if and how creation of the Shots filesystem structure happens during export. hiero_update_shot
hook_update_cuts Called during SG shot processing. Provides methods for managing if and how Cuts and CutItems are created and updated. hiero_update_cuts

Templates

Name Description Default value Fields
template_plate_path A reference to a template which specifies the directory to publish shot plates to. The translate template hook must understand how to translate this to Hiero keywords.
template_copy_path A reference to a template which specifies the directory to publish shot plates to. The translate template hook must understand how to translate this to Hiero keywords.
template_nuke_script_path A reference to a template which specifies what published nuke scripts will be named. The translate template hook must understand how to translate this to Hiero keywords.
template_render_path A reference to a template which specifies what renders will be named. The translate template hook must understand how to translate this to Hiero keywords.
template_version String template that specifies how to format the Hiero tk_version token as a version string for tk.

About

A Shotgun Pipeline Toolkit App that implements a custom exporter in Hiero

Topics

Resources

License

Security policy

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Python 100.0%