-
Notifications
You must be signed in to change notification settings - Fork 2
Home
This wiki is a collection of information for implementing Asset API Plugins in Foundry's Katana.
An Asset plugin is expected to implement 20 different methods of the Asset API base class. For each function this wiki will try to explain:
- What this method should do
- Minimum functionality needed
- Deal with different types of errors
- Examples of why and when Katana could call this
The methods can loosely be grouped into several categories, in order of importance.
-
containsAssetId
Input string contains a valid asset id anywhere within it. -
getAssetVersions
Find all the available versions of the given asset. -
isAssetId
Input string represents a valid asset id. -
resolveAsset
Lookup asset id and return path that it references. -
resolveAllAssets
Replace asset ids found with resolved asset strings. -
resolvePath
Resolve env vars, asset ids, and file sequences in. -
resolveAssetVersion
Returns the version for a given asset id.
-
createAssetAndPath
Create asset and optional directory path. -
createTransaction
Create optional transaction for multiple assets. -
postCreateAsset
Finish asset after the files to be published exist.
-
buildAssetId
Convert string fields into an asset id. -
getRelatedAssetId
Find related assets. -
getAssetAttributes
Get metadata associated with an asset. -
getAssetFields
Convert an asset id named string fields. -
getAssetIdForScope
Change scope of an asset id. -
setAssetAttributes
Set metadata associated with asset id.
-
checkPermissions
Validate certain operations allowed on asset id. -
getAssetDisplayName
Name suitable for displaying to users for an asset id. -
getUniqueScenegraphLocationFromAssetId
Scenegraph location name for an asset id. -
reset
Reset any plugin state -
runAssetPluginCommand
Run arbitrary command on an asset id.
This documentation is released under the Creative Commons CC0 "No Rights Reserved" license. https://creativecommons.org/share-your-work/public-domain/cc0
By contributing to this wiki you agree to license any text you change or contribute under the CC0 license.
Foundry's limited documentation is spread across Python code examples, header files, and disconnected fragments in their Katana documentation.
- https://learn.foundry.com/katana/dev-guide/OpsAndOpScript/AssetAPI/Cpp.html
- https://learn.foundry.com/katana/dev-guide/Plugins/Asset/Cpp.html
- https://learn.foundry.com/katana/dev-guide/Plugins/Asset/Python.html
- https://learn.foundry.com/katana/Content/tg/asset_management_system_plugin_api/asset_management_system.html
- https://learn.foundry.com/katana/Content/tg/asset_management_system_plugin_api/publishing_asset.html
- Peter Shinners helped assemble the initial version of these documents from notes collected while implementing the Asset API plugin for Blizzard Entertainment. Before that Peter worked at Sony Imageworks on the early, internal versions of Katana.
Resolve
containsAssetId
getAssetVersions
isAssetId
resolveAsset
resolveAllAssets
resolvePath
resolveAssetVersion
Publish
Attributes
buildAssetId
getRelatedAssetId
getAssetAttributes
getAssetFields
getAssetIdForScope
setAssetAttributes
Nodegraph