Skip to content
Peter Shinners edited this page Apr 18, 2021 · 7 revisions
void  getAssetIdForScope(
    const std::string& assetId,
    const std::string& scope,
    std::string& ret
)

Modify an assetId into another assetId.

The most common use for this function is to remove a specific version number from an assetId. Katana will pass a scope of "name" to represent this request.

It is possible for an asset plugin to define additional scopes like "shot" or "show". But whatever assetId that returns would be defined by the asset plugin.

This method must always return an assetId. If the requested scope does not match the given assetId this function should copy the unmodified assetId into ret.

Katana can also request the scope be "version" which may want to add information about the latest version to an assetId that is only for "name". TODO -- is this true?

Other methods getAssetAttributes and setAssetAttributes take a similar scope argument to get the behavior of this method without having to call this directly.

Katana uses this method with a scope of "name" to collapse recently used versions of the same asset name into a single entry in the recently used history. That unversioned string will then be used when loading a recent file with resolveAsset.

It is possible LookFileManager will also use this call with scope always set to "version". TODO -- is this true?