# Asset Resolution
As of version 6.5.0 Multiverse supports Asset resolution for USD assets. This feature is useful for users and organizations which rely on a more structured pipeline.
The name of the asset resolver plug-in to use can be set through the
MV_USD_ASSET_RESOLVER environment variable.
This variable has to be set before the Multiverse plug-in is loaded and cannot be changed within a running Maya session.
If Multiverse detects that the
MV_USD_ASSET_RESOLVER variable is set, it will
print a message on the console, e.g.:
// Multiverse: using 'ArDefaultResolver' asset resolver
# No explicit resolver
MV_USD_ASSET_RESOLVER is not set, Multiverse will treat asset paths as
simple files - this is equivalent to the resolution mode used by previous
versions of Multiverse.
USD files loaded into Multiverse Compound nodes are treated as files. The Use Relative Path option available in the asset loading UI and in the API controls if the value stored in the Maya Multiverse Compound node is an absolute path or a path relative to the current Maya project.
References to USD files stored in compositions are always treated as relative paths.
# Using the default USD resolver
To use the default USD resolver the
variable needs to be set to
MV_USD_ASSET_RESOLVER is set, the Use Relative Path option in the
Multiverse loading UI will be grayed out.
ArDefaultResolver plug-in also treats asset paths as filesystem
paths. Asset resolution is performed by searching for an asset in a specified
list of directories. The directories to use for asset resolution can be defined
PXR_AR_DEFAULT_SEARCH_PATH environment variable, for example:
The order of the paths set in the variable is respected by the plug-in when
resolving an asset. If an asset can be resolved into a file that exists in more
that one folder, the first one will be used. In the example above, assets will
be first searched first in
//server... and then, if not found, in
PXR_AR_DEFAULT_SEARCH_PATH variable is not set, all asset paths will
be treated as absolute paths. In this case Multiverse will print a warning
message in the Maya script editor:
// Warning: Multiverse: asset resolver set to 'ArDefaultResolver' but PXR_AR_DEFAULT_SEARCH_PATH is not defined
Notice that Maya scenes previously saved with assets encoded using relative
paths will not resolve correctly in case the
ArDefaultResolver is used and
the search paths set in
PXR_AR_DEFAULT_SEARCH_PATH don't match the loaded
assets. Likewise compositions which reference USD files won’t be resolved.
# Using a custom resolver
Multiverse also supports custom asset resolvers. Custom resolvers are
implemented as C++
Ar plug-in using the Pixar USD Ar API.
To use a custom asset resolver plug-in (for example
MV_USD_ASSET_RESOLVER environment variable to the resolver name: