omniClientResolve

Defined in OmniClient.h

OmniClientRequestId omniClientResolve(char const *relativePath, char const *const *searchPaths, uint32_t numSearchPaths, void *userData, OmniClientResolveCallback callback)

Resolve operates similarly to stat with one major difference.

You may pass an (ordered) list of paths that are searched if the item is not found. The search paths may be a full URL, or a partial URL. If it’s a partial URL, it will be combined with the base URL (set with omniClientPushBaseUrl)

For example, given:

  • Base URL: omniverse://sandbox.ov.nvidia.com/project/stage.usd

  • Search Paths:

    1. materials/

    2. /materials/

    3. omniverse://ov-materials/

    4. file:/c:/materials/

  • Relative Path: wood/oak.mdl

This function will search in the following places:

  1. omniverse://sandbox.ov.nvidia.com/project/wood/oak.mdl

  2. omniverse://sandbox.ov.nvidia.com/project/materials/wood/oak.mdl

  3. omniverse://sandbox.ov.nvidia.com/materials/wood/oak.mdl

  4. omniverse://ov-materials/wood/oak.mdl

  5. file:/c:/materials/wood/oak.mdl

And given the same search paths and URL, but with a base URL of: file:/c:/projects/a/stage.usd

This function will search in the following places:

  1. file:/c:/projects/a/wood/oak.mdl

  2. file:/c:/projects/a/materials/wood/oak.mdl

  3. file:/c:/materials/wood/oak.mdl

  4. omniverse://ov-materials/wood/oak.mdl

  5. file:/c:/materials/wood/oak.mdl

If found, “url” will be the FULL URL of the item that was found

Note

If this function is called after omniClientShutdown, kInvalidRequestId will be returned, and the callback will not be called.