Skip to content
Peter Shinners edited this page Apr 16, 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. These values could be set through [setAssetAttributes].

This differs from [getAssetFields] which are the values that uniquely define the asset itself. This function is about additional metadata and information about the asset.

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 solution. There is no requirement or expectation that this function will do anything.

Parameter expressions are given the assetAttr function that will look up data from this asset plugin.

Katana provides an example Casting Sheet plugin that can show this attribute data.