Hooks

Import Footage

class import_footage.ImportFootage(parent)[source]

Used to control the way the current context fields are displayed.

set_import_options(import_options)[source]

This method is called in case the engines’ import_filepath method is called. It is used to set the correct parameters to the given adobe.ImportOptionsObject.

This method should modify the incoming object with the correct settings for the given filepath.

The filepath can be accesssed by doing import_options.file.fsName.

Parameters:

import_options (adobe.ImportOptionsObject.) – The import options as set by After Effects

Context Fields Display

class context_fields_display.ContextFieldsDisplay(parent)[source]

Used to control the way the current context fields are displayed.

get_entity_fields(entity_type)[source]

Given a particular entity type for the current context, return a list of fields to query for display in the header.

Note: the thumbnail (“image” field) query/display is handled by the engine and is not required to be returned by this method.

Parameters:

entity_type – Shotgun entity type to return fields for

Returns:

list of Shotgun fields

get_context_html(entity, sg_globals)[source]

Returns the html used to display the supplied context entity.

This method is called once the engine has queried values for the fields returned from the get_entity_fields method. The supplied entity will be populated with the queried values for those fields.

Note: The default implementation returns a table of field/value names that will display next to the entity’s thumbnail. The thumbnail query, download, and display is handled by the engine, so the html returned here will be inserted to the right of that thumbnail.

Parameters:
  • entity – Shotgun entity to display context fields for.

  • sg_globals – A handle on the shotgun globals api provided via the shotgunutils framework. This is useful for querying display names for fields, statuses, etc.

Returns:

An html str that will be displayed in the panel.

Here are some css classes that can be used to display text in various ways:

The name of a queried field such as: "Type", "Name", "Shot",
"Asset", or some other text that doesn't hold a value from PTR or
doesn't need emphasis:

   `sg_label` - grey label color
   `sg_label_td` - same as `sg_label` but includes alignment and
       other style for use in table data cells.

The value of a queried field such as: "Character", "Shot01",
"Bunny", or some other text that holds a value from PTR or needs
emphasis:

   `sg_value` - brighter text
   `sg_value_td` - same as `sg_value` but includes alignment and
       other style for use in table data cells.

See the default implementation for usage examples.