User guide
27 Asset Management System
Plug-in API
The Katana Asset plug-in API is a Python and C++ interface for integrating Katana with asset management systems. It
permits retrieval and publishing of assets within Katana. The asset management plug-in API provides four core
mechanisms which are described in the Asset API chapter of the Katana User Guide.
The Asset plug-in API does not provide any functions for traversing over a Katana Scene Graph or for editing nodes,
and it is not a replacement asset management system. It is referenced when resolving a recipe and should therefore
not traverse the Node Graph directly, or instantiate a scene graph iterator. An Asset plug-in is invoked during
interactive Katana sessions and also during rendering.
Katana ships with an example Asset plug-in, called PyMockAsset. The source file MockAsset.py for the example
plug-in is located in:
${KATANA_ROOT}/plugins/Src/Resources/Examples/AssetPlugins/
As well as source file PyMockAssetWidgetDelegate.py for the corresponding UI widget used with PyMockAsset,
which is found in:
${KATANA_ROOT}/plugins/Src/Resources/Examples/UIPlugins/
PyMultiMockAsset is an extended version of PyMockAsset to allow a number of different asset resolving behaviors,
such as publishing to a database or saving to a sandbox. This example uses assetIds with different prefix values to
determine which behavior should be used. Further details are provided in the plug-in source file.
Concepts
Asset ID
An Asset ID is a serialization of an asset’s fields. In a simple case, using the default File Asset plug-in, the Asset ID is
the file path, but in more complex systems it could be an SQL query, a URL, a GUID or a direct string representation
of the asset's fields, such as the PyMockAsset Asset ID shown below.
mock:///show/shot/name/version