Issue: Only the first plugin directory gets registered in USD’s PlugRegistry
I’m trying to register multiple USD plugins using pxr::PlugRegistry::RegisterPlugins()
. However, only the first directory string it reads gets registered, and the others are ignored. I’m doing this manually, since I’m an intern and I’m trying to export objects from a simulation model. I don’t have permissions to use system variables so I have to manually add the paths via this function.
Code snippet:
cpp
pxr::PlugRegistry::GetInstance().RegisterPlugins("path/to/plugin1");
pxr::PlugRegistry::GetInstance().RegisterPlugins("path/to/plugin2");
pxr::PlugRegistry::GetInstance().RegisterPlugins("path/to/plugin3");
Only plugin1
gets registered, while plugin2
and plugin3
are missing when I try to retrieve them with GetPluginWithName()
. It does matter what order I put the plugins in since only the first string (or even the first string in a string vector) gets registered.
What I found:
It seems that USD caches plugin discovery on the first call to RegisterPlugins()
, so calling it multiple times with different paths doesn’t work. I tried looping.
Can anyone explain if I’m doing anything wrong? I’m also open to other solutions to link the plugins.