define_usd_prim
Defines a USD prim at a given path on a registered stage, creating missing ancestors and setting type/specifier; omit type_name to retype it to Xform.
Instructions
Define a prim (specifier def) of type_name at prim_path on a registered USD stage, at its current edit target, defining missing ancestors as typeless prims. On an existing prim of another type it replaces the type, so leaving type_name out retypes it to Xform. The requested specifier is then authored at the edit target (specifier_set_ok); specifier reports it only when that write succeeded, and a failed write fails the call. An unknown specifier is refused before anything is authored. In memory only: save_usd_stage writes it. override_usd_prim authors an over instead; set_usd_prim_type changes only the type.
Returns: { prim_path: string, type_name: string, specifier?: string, is_valid: bool, specifier_set_ok: bool, requested?: object }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prim_path | Yes | Absolute SdfPath, e.g. /World/Cube | |
| specifier | No | "Def" | "Over" | "Class", case-insensitive; anything else is refused. Default: Def | |
| type_name | No | USD type name (Xform, Mesh, Cube, Scope, Camera, DistantLight...). Default: Xform | |
| stage_name | No | Name the stage was registered under |