So the usd plugin system feels kind of barebones to put it mildly.
Having to know the location of every version of every plugin ahead of time means lots of pre-launch logic setting up the usd plugin paths. And since Maya and Houdini each use different usd versions per software version, we have to keep lots of different compiles of our plugins around. That logic gets more complicated when the usd version for the current DCC version gets updated. Plus we have to juggle windows and linux paths.
It’s annoying because the USD library already knows its own version, but there’s no way to have USD filter plugins based on that version.
I’d like to set up something akin to maya’s modfiles, and I was hoping I could write my own python plugin to add some useful logic to USD’s plugin loader… But I couldn’t find any mechanism to auto load a plugin. Is there a way to set that up? Or even a hack by making dummy plugins?
Also, as I was looking into this, I found that the python usd plugin system doesn’t ensure that the plugin is available to python. If you’re loading a python plugin, that means you want it to be runnable, right? I think an option to add the plugin path to the sys.path as part of the “Info” key would make sense. Or maybe just add that path to sys.path temporarily when loading the plugin? That’s another thing I’m definitely going to add to my plugin system… If it’s even possible to write my plugin system.