Navigation
API > API/Plugins > API/Plugins/USDPregenWrapper > API/Plugins/USDPregenWrapper/IStoragePlugin
Description
Resolve ${PLACEHOLDER}_ substitutions in Template_ and return the final package sub-path. Designed to be reused by all storage plugin implementations.
Recognized placeholders (all wrapped in `${...}_): ${DEFINITION_NAME} - Definitions.Last().GetName() ${DEFINITION_VERSION} - Definitions.Last().GetVersion() ${DEFINITION_UID} - Definitions.Last().GetUniqueId() ${PERMUTATION_ID} - TargetUid.GetPermutationUid() ${ASSET_TYPE} - the AssetType parameter ${METADATA:KEY} - looks up KEY in the leaf definition's metadata dictionary (populated from USD assetInfo, less the built-in keys). Nested dicts are descended via colon-separated paths, e.g. ${METADATA:nested:subcategory}. Non-scalar leaf values (dicts/ arrays) and missing keys both collapse to the empty-value sentinel.
`ExtraSubstitutions_ is consulted first and overrides the built-in placeholders. Unknown placeholders resolve to the empty-value sentinel ("_").
Each substituted value is sanitized: alnum + __ pass through; every other char becomes _; empty results become the sentinel (""). Consecutive /_ are collapsed and a single trailing /_ is trimmed.
Example: Template "assets/${DEFINITION_NAME}/${PERMUTATION_ID}" with name "chemistry_bottle02" and permutation "2559017893" resolves to "assets/chemistry_bottle02/2559017893".
| Name | ResolvePackageSubPathTemplate |
| Type | function |
| Header File | /Engine/Plugins/Experimental/USDPregen/Source/USDPregenWrapper/Public/UsdPregenWrappers/IStoragePlugin.h |
| Include Path | #include "UsdPregenWrappers/IStoragePlugin.h" |
| Source | /Engine/Plugins/Experimental/USDPregen/Source/USDPregenWrapper/Private/UsdPregenWrappers/IStoragePlugin.cpp |
static FString ResolvePackageSubPathTemplate
(
const FString & Template,
const FTargetUid & TargetUid,
const TArray < FExtAssetDefinition > & Definitions,
const FString & AssetType,
const TMap < FString , FString > & ExtraSubstitutions
)