User guide

213
getRelatedAssetId()
Given an Asset ID and a string representing a relationship or connection, returns another Asset ID. For example, with
a shader file that has an Args file getRelatedAssetId() can be used to get the Asset ID of the Args file from the Asset
ID of the shader. The contexts listed in Asset Types and Contexts are passed to getRelatedAssetId().
NOTE: If getRelatedAssetId() returns either None, or an empty string, Katana looks up the Args file in
the default fashion, relative to the .so file location.
NOTE: If getRelatedAssetId() returns anything other than None or an empty string, Katana attempts to
load the returned Asset ID. If for any reason that Asset ID is not valid, Katana will not fall back to the
default behavior, but will give a load error.
getAssetIdForScope()
This truncates an Asset ID to the given scope, where the scope is an asset field.
For example:
getAssetIdForScope( "mock://myShow/myShot/myName/myVersion", "shot" )
Produces:
mock://myShow/myShot
The returned Asset ID no longer contains the name and version components.
This is used by the assetAttr() built-in function that Python expressions have access to, and by Katana internally.
setAssetAttributes()
Allows users to set additional metadata on an asset.
This is not used by anything in the Katana codebase. It is entirely up to the users to make use of this function.
getAssetAttributes()
Allows users to store additional metadata on an asset.
27 ASSET MANAGEMENT SYSTEM PLUG-IN API | ADDITIONAL METHODS