# 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.

Note

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

If the 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 MV_USD_ASSET_RESOLVER environment variable needs to be set to ArDefaultResolver:

On macOS/Linux:

export MV_USD_ASSET_RESOLVER=ArDefaultResolver
1

On Windows:

set MV_USD_ASSET_RESOLVER=ArDefaultResolver
1

Note

If MV_USD_ASSET_RESOLVER is set, the Use Relative Path option in the Multiverse loading UI will be grayed out.

The 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 through the PXR_AR_DEFAULT_SEARCH_PATH environment variable, for example:

on macOS/Linux:

export PXR_AR_DEFAULT_SEARCH_PATH=//server1/data/path1:/path/to/folder
1

on Windows:

set PXR_AR_DEFAULT_SEARCH_PATH=X:/data/path1;Y:/data/path2
1

Important

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 /path/to/folder.

If the 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 CompanyXYZResolver) simply set MV_USD_ASSET_RESOLVER environment variable to the resolver name:

On macOS/Linux:

export MV_USD_ASSET_RESOLVER=CompanyXYZResolver
1

On Windows:

set MV_USD_ASSET_RESOLVER=CompanyXYZResolver
1
Last Updated: 7/1/2020, 4:08:23 PM