I’m looking for an elegant solution to provide a Primary AssetResolver iff another Primary AR hasn’t been provided.
I’d initially expected this to be linked to the plugin search path order but, looking at resolver.cpp (and specifically _GetAvailableResolvers()) it appears registered resolvers are always sorted by typeName (with ArDefaultResolver then added at the end) and then the first one is used?
I’m hoping this doesn’t mean I should be naming my resolver zzzzz_ARFallback
The only other control I found for this is at the application level via ArSetPreferredResolver but that’s not quite what I’m after either.
@robp_sidefx , do you believe you have enough control over plugin search order (e.g. in light of PXR_PLUGINPATH_NAME env var) for that to be a workable solution?
Hi Spiff! I’m fairly confident a search-path order approach will work for us.
We will need to look at the details of how this works, as we also make calls from Houdini to register extra plugins based on other Houdini environment variables. I just want to ensure we aren’t surprised by suddenly being “blocked” when we don’t expect to be (or not “blocked” when we do expect to be).
Yeah, the interplay of code-registered plugins jumped out to me as a complication, also. If it does seem feasible, we’d consider a PR that makes the behavior change, if you’re inclined?