HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UsdShadeUdimUtils Class Reference

#include <udimUtils.h>

Public Types

using ResolvedPathAndTile = std::pair< std::string, std::string >
 

Static Public Member Functions

static USDSHADE_API bool IsUdimIdentifier (const std::string &identifier)
 
static USDSHADE_API std::string ReplaceUdimPattern (const std::string &identifierWithPattern, const std::string &replacement)
 
static USDSHADE_API std::string ResolveUdimPath (const std::string &udimPath, const SdfLayerHandle &layer)
 
static USDSHADE_API
std::vector
< ResolvedPathAndTile
ResolveUdimTilePaths (const std::string &udimPath, const SdfLayerHandle &layer)
 

Detailed Description

This class contains a set of utility functions used for working with Udim texture paths

Definition at line 44 of file udimUtils.h.

Member Typedef Documentation

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.

Member Function Documentation

static USDSHADE_API bool UsdShadeUdimUtils::IsUdimIdentifier ( const std::string identifier)
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 USDSHADE_API std::string UsdShadeUdimUtils::ReplaceUdimPattern ( const std::string identifierWithPattern,
const std::string replacement 
)
static

Replaces the UDIM pattern contained in identifierWithPattern with replacement

static USDSHADE_API std::string UsdShadeUdimUtils::ResolveUdimPath ( const std::string udimPath,
const SdfLayerHandle &  layer 
)
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 USDSHADE_API std::vector<ResolvedPathAndTile> UsdShadeUdimUtils::ResolveUdimTilePaths ( const std::string udimPath,
const SdfLayerHandle &  layer 
)
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.


The documentation for this class was generated from the following file: