insert_usd_sublayer
Insert a USD sublayer into a stage's root layer composition stack, optionally at a set index, and skip duplicates so repeated runs are safe.
Instructions
Add a sublayer path to the stage's root layer's composition stack (idempotent — re-running with the same path returns already_present without erroring).
Returns: { stage_name: string, sublayer_path: string, index: int, inserted: bool, already_present: bool, new_count: int, saved: bool, errors: [string]? }
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| index | No | 0-based insertion position; -1 (default) appends to the back of the prepend list. | |
| stage_name | Yes | Name the stage was registered under. | |
| sublayer_path | Yes | Path or USD identifier of the layer to insert (e.g. an absolute .usd path or a "//sub.usd" relative identifier). |