-
Notifications
You must be signed in to change notification settings - Fork 2
getAssetFields
void getAssetFields(
const std::string& assetId,
bool includeDefaults,
StringMap& returnFields
)
Parse an assetId into a set of fields that it represents.
Katana doesn't use the returned fields itself. They are only needed to pass to other asset plugin methods. The fields are used for the publish functions, createAssetAndPath and createAssetAndPath. The fields can also be converted back into an assetId with [buildAssetId].
These field values are different than the assetId attributes used by getAssetAttributes. The fields only need to be the individual values that identify the assetId. The attributes are used to identify optional metadata and information about the assetId.
Katana implies there should be a "name" value in the returnFields
that
represents the unversioned assetId. If defined there can also be a "version"
value that represents the fully resolved versioned assetId.
The simplest possible implementation is to copy the assetId
into a field in
the string map. To work with other Katana features this should put an
unversioned assetId into the "name" field. Also consider an empty string in the
"version" when includeDefaults
is true to enable Katana's "version up and
save" operations.
If includeDefaults
is true then returnFields
should be populated with empty
strings for whatever values are normally returned. Otherwise these empty values
can be omitted from the string map.
Katana's main menu has a "Version Up And Save" action under the file manu. This
action will only be enabled if this method places a "version" value into the
string map. The main menu passes includeDefaults
set to true, so this method
could always include an empty "version" string when includeDefaults
is true.
Katana will call this on the loaded scene. The "name" field this returns will be
put into the nodegraph root as "katanaSceneName". This is also the value
returned from KatanaFile.GetKatanaSceneName()
Resolve
containsAssetId
getAssetVersions
isAssetId
resolveAsset
resolveAllAssets
resolvePath
resolveAssetVersion
Publish
Attributes
buildAssetId
getRelatedAssetId
getAssetAttributes
getAssetFields
getAssetIdForScope
setAssetAttributes
Nodegraph