Creating an Asset Plug-in
A Python Asset plug-in is created by making a new Python file in an AssetPlugins sub-directory of a folder in a KATANA_RESOURCES directory.
Note: Asset management plug-ins can also be written in C++. See The C++ API for more on this.
Core Methods
The core methods for an Asset plug-in are:
Handling Asset IDs
• buildAssetId()
Serialize asset fields into an Asset ID.
• getAssetFields()
Deserialize an Asset ID into asset fields.
• isAssetId()
Check if a string is an Asset ID.
Publishing an Asset
• createAssetAndPath()
Create an entry for a new asset and optionally pre-publish it. This could have very little in it if your asset management system does most of its work post creation in postCreateAsset.
• postCreateAsset()
Publish the new asset. This could have very little in it if your asset management system does most of its work immediately when the resource is allocated in createAssetAndPath.
Retrieving an Asset
• resolveAsset()
Convert an Asset ID to a file path.
• resolvePath()
Convert an Asset ID and a frame number to a file path.
Note: Python-based AssetAPI plug-ins have been deprecated, and support for them will be removed. Moving forward, for performance and stability reasons, AssetAPI plug-ins should be written in C++.
For more information, refer to the support article Deprecation of Python-based AssetAPI plug-ins.