Failure to find OmniUsdResolver

Hi, I started getting this issue lately.

When I look at the plugin info, I see the omni USD-resolver should be part of the omniclient.dll which is included in the project.

I have included this in the post build step, also tried including .lib files and headers.
I have built a dll from the example project.

I think the issue is that the example command line app uses the dll that requires other libraries, and it can’t do that for some reason, which makes the connector example pretty much useless in production.

The connector crashes on the line 965. I have also confirmed that the example project is able to delete the helloworld.usd file.

So, if someone can tell me how the connector is supposed to be loaded in the application along with its child dependencies, I would greatly appreciate that.

We recently separated the Omniverse Client Library and the Omniverse USD Resolver Plugin so that the Client Library would not be dependent on USD. With this change you need to ensure either:

  • The OmniUsdResolver is copied to the correct folder for your application (the samples do this)
  • Initialized wherever you decide to put it (using PXR_NS::PlugRegistry::GetInstance().RegisterPlugins())

I tried to outline this as clearly as possible in the Connect Sample docs here: Connect Sample — Omniverse Connect documentation

Here’s a snippet from the docs:

The Connect Samples copy the USD Resolver files into the correct place so it is automatically initialized, but we made an example for initializing the resolver plugin anyway in liveSession.cpp. For more information on explicitly initializing the plugin, see the resolver docs in the “Initializing” section.

Just to complete the thought, here’s the code snippet from liveSession.cpp that registers the OmniUsdResolver plugin. Note, this must be done before any AssetResolver interface methods are called:

    // Find absolute path of the resolver plugin's `resources` folder 
    std::string pluginResourcesFolder = getExePath().parent_path().string() + "/usd/omniverse/resources";
    PlugRegistry::GetInstance().RegisterPlugins(pluginResourcesFolder);
    std::string PluginName = "OmniUsdResolver";
    if (TfType::FindByName(PluginName).IsUnknown())
    {
        failNotify("Could not find the Omniverse USD Resolver plugin");
        return false;
    }

I’m almost certain that this is your issue, let me know if this helps.

Thanks, looks like exactly what I need. I’ll try that as soon as I have time from other work.