set_usd_prim_metadata
Set a metadata field such as comment, documentation, or kind on an existing USD prim in a registered stage at the current edit target. Returns set status and converted value; changes remain unsaved.
Instructions
Author one metadata field (e.g. "comment", "documentation", "kind") on an existing prim of a registered USD stage, at the current edit target. USD returns set=false when the value type does not match the field type; the reply echoes the converted value. Not saved to disk.
Returns: { set: bool, key: string, value: object }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| key | Yes | Registered USD prim metadata field, e.g. "comment", "documentation", "kind" or "hidden"; a key USD does not register as prim metadata fails with set=false. | |
| value | No | {type?: "bool|int|int64|float|double|string|token|asset", value: <scalar>} OR a bare scalar; without type the JSON type decides (bool, number stored as double, string). Token fields such as "kind" need type "token". | |
| 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. |