Is there a way to reflect on schema types brought in from a (codeless) plugin?
it seems like UsdSchemaBase::GetSchemaAttributeNames is implemented by each specific type and as a codeless schema does not implement it, there is just no way to list its attributes?
Also it seems like UsdSchemaBase::GetSchemaAttributeNames requires a prim instance to work with, I would have expected TfType to have a way to inspect each baseType or ancestor.
GetSchemaAttributeNames() is an unfortunate carryover from very early days that has a number of deficiencies, and we’d like to deprecate it at some point.
You can get much more comprehensive knowledge about any single schema or the totality of all schemas applied to a prim – codeless or code-ful --, by using the UsdSchemaRegistry to fetch a UsdPrimDefinition, from which you can query information about all the properties and builtin applied schemas of the schema(s).
The one thing lacking in the UsdSchemaRegistry/UsdPrimDefinition setup is the separation of immediate vs inherited properties in a schema. The SchemaRegistry does not track which properties are inherited, whereas GetSchemaAttributeNames() by default returns only the immediate attribute names, and some of our clients rely on that information.