Skip to content
Peter Shinners edited this page Apr 18, 2021 · 5 revisions
void getAssetAttributes(
    const std::string& assetId, 
    const std::string& scope,
    StringMap& returnAttrs
)

Provide optional metadata and values for an asset.

An asset reference could theoretically provide additional information about an asset like comments, types, users, or timestamps. Tools using Katana can attempt to set these values through setAssetAttributes.

This differs from getAssetFields which are the values that uniquely define the asset itself.

The scope argument is used to modify which asset entity the attributes come from. It can commonly be set to "version" or "name" which has similar meaning to the scope argument in getAssetForScope.

Remember that all values provided must be converted to strings to place inside the returnAttrs StringMap.

This call is entirely optional for an asset plugin. It is not used by Katana but provided as a general feature for scripts and tools inside Katana. There is no requirement or expectation that this function will do anything.

Parameter expressions can use the assetAttr function that will look up data from this asset plugin. Katana also provides an example Casting Sheet plugin that can show this attribute data.