create_usd_attribute
Create a typed USD attribute on an existing prim, returning it or reusing an existing attribute. Edits the open stage in memory; save the stage separately to persist changes.
Instructions
Create an attribute of a given USD type on a prim of an open stage, or return the existing one with created false. Edits the stage in memory; save_usd_stage writes it. Returns name, type_name, cpp_type and created; author its value with set_usd_attribute_value.
Returns: { prim_path: string, name: string, type_name: string, cpp_type: string, created: bool }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| attr_name | Yes | Attribute name (e.g. "size", "displayColor") | |
| prim_path | Yes | Absolute SdfPath of an existing prim on that stage, e.g. "/World/Cube". | |
| type_name | Yes | USD type name (e.g. "float", "float3", "token", "asset") | |
| stage_name | Yes | Name the stage was registered under by open_usd_stage (default the file basename) or create_usd_stage (default "Untitled"). |