resources.Katana.AssetPlugins.ShotgunAssetPlugin module¶
-
class
ShotgunAssetPlugin¶ Bases:
sphinx.ext.autodoc.importer._MockObjectThe main class of the plug-in that will be registered as “Shotgun”. It extends AssetAPI.BaseAssetPlugin to create an asset plug-in class and implements all abstract functions from the plug-in interface.
-
createTransaction()¶ Creates a transaction object
-
getAssetFields(assetId, includeDefaults=False)¶ Resolves an asset ID to a dict of all of the required fields. Returns a dict, keyed by the field names that the corresponding Shotgun template will expect
-
isAssetId(string)¶ Checks if the given string is a valid asset ID
-
reset()¶ Resets the state of the plug-in
-
resolveAllAssets(string)¶ For each asset ID found in the given string (isolated by whitespaces) it will be resolved and the original string will be substituted
-
resolveAsset(assetId, throwOnError=False)¶ Lookups the given asset ID in Shotgun and returns the file path that it references
-
resolveAssetVersion(assetId, versionTag='')¶ Returns the version for the given asset ID. If it is a partial asset ID (which doesn’t have a version) then None is returned
-
resolvePath(assetId, frame)¶ Resolves the given asset ID and if it comes as a file sequence then we will resolve that file sequence to the specified frame using the currently selected FileSequence plug-in
-
setupTank()¶ This function relies on the SGTK_CONTEXT environment var being previously set by Shotgun.
-