newton.usd.has_applied_api_schema#
- newton.usd.has_applied_api_schema(prim, schema_name)[source]#
Check if a USD prim has an applied API schema, even if the schema is not registered with USD’s schema registry.
For registered schemas (e.g.
UsdPhysics.RigidBodyAPI),prim.HasAPI()is sufficient. However, non-core schemas that may be in draft state or not yet registered (e.g. MuJoCo-specific schemas likeMjcSiteAPI) will not be found byHasAPI(). This helper falls back to inspecting the rawapiSchemasmetadata on the prim.- Parameters:
prim (pxr.Usd.Prim) – The USD prim to query.
schema_name (str) – The API schema name to check for (e.g.
"MjcSiteAPI").
- Returns:
True if the schema is applied to the prim, False otherwise.
- Return type: