@Andaharoo , sounds like you solved your custom schema registration problem, which is great. It is not currently possible to refer to a custom schema directly in a USD file as opposed to from a plugin - that’s a project we have identified as “per-stage schemas”, which we hope to tackle within the next year.
It is also not possible to define a schema at runtime using python or C++, because the UsdSchemaRegistry currently does not allow additions once it has been initialized.
Yeah edited the question quickly since I figured that out on my own after delving a bit more into source. Since you mentioned it though I’ll provide what I found for others. To list the loaded schema’s one can use:
const pxr::TfType schemaBaseType = pxr::TfType::Find<pxr::UsdSchemaBase>();
std::set<pxr::TfType> types;
pxr::PlugRegistry::GetAllDerivedTypes(schemaBaseType, &types);
for (auto val : types)
{
std::cout << val << std::endl;
}
This can help in verifying whether your schema was loaded or not. And under what name/alias.