Skip to content

getAssetDisplayName

pshinners edited this page Feb 9, 2022 · 6 revisions
void getAssetDisplayName(
    const std::string& assetId, 
    std::string& ret
)

Generate a short and readable name for the assetId and copy it into the ret argument.

The ret string can be any part of the existing assetId that is makes it understandable to an artist without requiring the fully formatted assetId.

The returned value is used only for display purposes. It is not used to convert back into an assetId or used for any other asset plugin calls.

This is used in Katana's main window to represent the currently loaded file. It is called frequently during file loading with the path of the file being loaded. It may be wise to keep a simple cache to the recent value if your implementation requires accessing remote resources.

This is also used by the LookFileManager node and Importomatic plugin for Alembic references.

This is also similar to getUniqueScenegraphLocationFromAssetId that Katana uses to generate scenegraph location names from an asset id.