apply_usd_prim_schema
Apply a USD API schema to an existing prim on a registered USD stage's current edit target. Checks compatibility first and returns applied status with a reason if it fails.
Instructions
Apply a USD API schema (e.g. "MaterialBindingAPI") to an existing prim of a registered USD stage, on the current edit target. Checks CanApplyAPI first: a schema that cannot apply returns applied=false with the USD reason in why_not instead of an error. Not saved to disk.
Returns: { applied: bool, schema_name: string, why_not?: string }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prim_path | Yes | Absolute SdfPath of an existing prim, e.g. "/World/Cube". | |
| stage_name | No | Name the stage was registered under by create_usd_stage or open_usd_stage; a stage already in the USD cache also matches by the end of its root layer identifier. | |
| schema_name | Yes | Schema identifier (not the C++ class name), e.g. "MaterialBindingAPI", "GeomModelAPI" |