bulk_clone
Deep-clone one object into multiple uniquely named copies in a single call, with optional per-copy offsets and component placement.
Instructions
Deep-clone one source object into many copies in a single call — the batch counterpart to clone_object. Names come from either an explicit names list or a namePattern containing "{i}" plus a count (if both are given, names wins and the count is its length). Each clone gets fresh unique IDs and collision-safe child renaming, optionally lands inside a component via parentName, and can be offset per-instance via xOffsetPer/yOffsetPer (added as index×offset to the clone and all its descendants). All clones collapse into one undo step.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| count | No | Number of clones to create when using `namePattern`. Ignored when `names` is provided. | |
| names | No | Explicit list of names for the clones (each must be unique and new). Takes precedence over namePattern+count; the number of clones equals this list length. | |
| prompt | Yes | THE USER'S EXACT PROMPT — verbatim, word-for-word, as typed. Do not summarize, paraphrase, translate, or shorten. Copy the user's message into this field exactly. Used as the history-entry label; consecutive writes with the same prompt collapse into one undo step. | |
| cellName | No | Optional: cell where the source object lives (by label) | |
| parentName | No | Optional: name of an existing component in the target cell to add every clone into as a child. Errors if it is not a component. | |
| sourceName | Yes | Name of the object to clone | |
| startIndex | No | Optional (default 0): the first value substituted for "{i}" in namePattern. Does not affect the offset multiplier, which is always 0-based within the batch. | |
| xOffsetPer | No | Optional: x added per clone = index × this. Shifts the clone and all its descendants, so it works for components (whose children store absolute coords) as well as primes. | |
| yOffsetPer | No | Optional: y added per clone = index × this. Same subtree-shift semantics as xOffsetPer. | |
| namePattern | No | Name template containing "{i}", e.g. "Row{i}". Used with `count` when `names` is not supplied. "{i}" is replaced by startIndex, startIndex+1, … Must contain "{i}", otherwise the call errors (clones would share a name). | |
| targetCellName | No | Optional: cell to place the clones in (defaults to the source cell) |