So we have some custom schemas we’re building where each schema type is Apple<SchemaName>
to avoid future conflicts.
e.g AppleCube/AppleGeom
to avoid conflicting with a possible Cube
I’m calling it appleCube
in this example just to demonstrate a conflict case, but of course we’re not doing a cube.
I have
over "GLOBAL" (
customData = {
string libraryName = "appleGeom"
string libraryPath = "."
string libraryPrefix = ""
string tokensPrefix = "AppleGeom"
}
) {
}
This means that in my USD files I get def AppleCube "Cube" () {...}
which prevents future conflicts.
However usdGenSchema
generates this plugInfo.json
where the alias conflicts with the name of the schema.
"AppleCube": {
"alias": {
"UsdSchemaBase": "AppleCube
},
"autoGenerated": true,
"bases": [
"UsdGeomCube"
],
"schemaKind": "abstractTyped"
},
This gives a coding error on load of
Coding Error: in AddAlias at line 1226 of OpenUSD/pxr/base/tf/type.cpp -- There already is a type named 'AppleCube' derived from base type 'UsdSchemaBase'; cannot create an alias of the same name.
If I give it a libraryPrefix
of Apple
, this fixes the issue, but now all my code classes are AppleAppleCube
which feels like a lot of redundancy.
Any thoughts on how best to tackle this situation?