I’m trying to put together a simple Hydra Generative Procedural plugin using the current release build of OpenUSD. I’ve copied the CubePerMeshPointProcedural from the Hydra tests to keep it simple, but I just can’t seem to get UsdView to expand/load the shared object and I’m not sure why?
and the plugInfo.json file is being found as I get errors when it’s malformed. When using TF_DEBUG=”PLUG*” I get
Will read plugin info /sandbox/CubePerMeshPointProcedural/build/plugInfo.json
Did read plugin info /sandbox/CubePerMeshPointProcedural/build/plugInfo.json
Registering shared library plugin ‘CubePerMeshPointProcedural’ at ‘/sandbox/CubePerMeshPointProcedural/build/libCubePerMeshPointProcedural.dylib’.
So it seems as if it’s finding the plugInfo.json but the prim ends up being resolved to an inertGenerativeProcedural when I inspect the Hydra debugger.
I decided to put a static instance of a class that just prints out a test string and it appears that it’s never called so I don’t think the shared object is ever opened?
I’ve tested it on both Windows and macOS, it has left me a little stumped - I’ve pushed the test to GitHub - PeregrineLabs/CubePerMeshPointProcedural for reference, if you set pxr_DIR to a build of OpenUSD it should build easily.
Just as a quick follow up, monkeying around with the source I can confirm that the plugInfo is being loaded and added to the registry.
It doesn’t appear that an instance of UsdHyrdaGenerativeProceduralAPI is ever created which means that a reference to my generative procedural plugin is never requested thus PlugPlugin::_Load() is never called.
to my GenerativeProcedural. I’m not sure if it’s a change in the schema or an issue in how it’s resolved but the default value doesn’t seem to be passed to the scene adapter (which was just returning and empty string).
It would be great to validate my findings, is this a required token now? For some reason I thought it would default to the schema’s value?
Thank you for the suggestion, I did see this but it’s from some time ago - from my digging it appears there was an AdapterRegistry refactor made that seems to be impacting this. My knowledge of the source or intention isn’t deep enough to pick apart where.
AsyncBegin and AsyncUpdate have also been added since a lot of the examples and I suspect the way forward but no examples (or tests) actually using that part of the API at the moment.