|
This class contains a set of utility functions used for working with Udim texture paths. More...
#include <udimUtils.h>
Public Types | |
using | ResolvedPathAndTile = std::pair< std::string, std::string > |
Pair representing a resolved UDIM path. | |
Static Public Member Functions | |
static USDSHADE_API bool | IsUdimIdentifier (const std::string &identifier) |
Checks if identifier contains a UDIM token. | |
static USDSHADE_API std::string | ReplaceUdimPattern (const std::string &identifierWithPattern, const std::string &replacement) |
Replaces the UDIM pattern contained in identifierWithPattern with replacement . | |
static USDSHADE_API std::string | ResolveUdimPath (const std::string &udimPath, const SdfLayerHandle &layer) |
Resolves a udimPath containing a UDIM token. | |
static USDSHADE_API std::vector< ResolvedPathAndTile > | ResolveUdimTilePaths (const std::string &udimPath, const SdfLayerHandle &layer) |
Attempts to resolve all paths which match a path containing a UDIM pattern. | |
This class contains a set of utility functions used for working with Udim texture paths.
Definition at line 44 of file udimUtils.h.
using ResolvedPathAndTile = std::pair<std::string, std::string> |
Pair representing a resolved UDIM path.
The first member is the fully resolved path The second number contains only the UDIM tile identifier.
Definition at line 50 of file udimUtils.h.
|
static |
Checks if identifier
contains a UDIM token.
Currently only "<UDIM>" is supported, but other patterns such as "_MAPID_" may be supported in the future.
|
static |
Replaces the UDIM pattern contained in identifierWithPattern
with replacement
.
|
static |
Resolves a udimPath
containing a UDIM token.
The path is first anchored with the passed layer
if needed, then the function attempts to resolve any possible UDIM tiles. If any exist, the resolved path is returned with "<UDIM>" substituted back in. If no resolves succeed or udimPath
does not contain a UDIM token, an empty string is returned.
|
static |
Attempts to resolve all paths which match a path containing a UDIM pattern.
The path is first anchored with the passed layer
if needed, then the function attempts to resolve all possible UDIM numbers in the path.