Advice for a minimal UsdMaya PrimReader plugin failing to load on demand #878
-
Hello, I'm attempting to setup a minimal, custom UsdMaya PrimReader plugin by referencing the code & examples in the maya-usd repository. After building and installing the new plugin, I tested the import of a simple USD file with the custom prim - the maya plugin does not seem to load on demand and the import fails (falls back to a empty transform). However, if I load the plugin manually through the plug-in manager before importing the USD file, then the expected nodes/geo are created. I was under the assumption that the I can share the current setup for the plugin - it's fairly minimal... was hoping someone with more experience could see if there are any missing pieces. The {
"Plugins": [
{
"Info": {
"UsdMaya": {
"PrimReader": {
"mayaPlugin": "wMayaUsdTranslators",
"providesTranslator": [
"WUsdExamplesTriangle"
]
}
}
},
"LibraryPath": "../../../wMayaUsdTranslators.so",
"Name": "wMayaUsdTranslators",
"Type": "library"
}
]
} There is an associated There is a ...
TF_REGISTRY_FUNCTION_WITH_TAG(UsdMayaPrimReaderRegistry, WUsdExamplesTriangle)
{
UsdMayaPrimReaderRegistry::Register<WUsdExamplesTriangle>(
[](const UsdMayaPrimReaderArgs& args) {
return std::make_shared<WMayaUsdTriangleReader>(args);
});
}
... The installation structure, relative to the install root, looks as follows: .
└── plugin
├── usd
│ ├── plugInfo.json
│ └── wMayaUsdTranslators
│ └── resources
│ └── plugInfo.json
└── wMayaUsdTranslators.so The The following env variables specific to this plugin are set-up for the runtime (linux):
... currently looking to build maya-usd with debugging info to dig further - but in the meanwhile if anyone happens to spot any glaring errors - I'd be in your debt! And to confirm, the type names inside the "providesTranslator" array (in Thanks for taking the time to read! |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
The type name is definitely the C++ name. Did you record a registry alias to help the PrimReaderRegistry discover the C++ name that corresponds to your USD primitive name? See for example the USD Skel primitives: |
Beta Was this translation helpful? Give feedback.
The type name is definitely the C++ name. Did you record a registry alias to help the PrimReaderRegistry discover the C++ name that corresponds to your USD primitive name? See for example the USD Skel primitives:
https://github.com/PixarAnimationStudios/USD/blob/release/pxr/usd/usdSkel/skeleton.cpp#L44