Preview creating a map layer
tiled_create_layerCreate an empty tile, object, image, or group layer in a Tiled map at a given index, pinning revisions for a safe, expiring change set without modifying project assets.
Instructions
Plans one empty tile, object, image or group layer at a root/group insertion index, pins map/dependency revisions, and returns an expiring change set without modifying project assets. Image layers require imagePath and may pin expectedImageRevision; other layer types reject both image fields.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | Yes | ||
| type | Yes | Layer kind. imagelayer requires imagePath; all other kinds forbid imagePath and expectedImageRevision. | |
| index | No | ||
| mapPath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| imagePath | No | Project-relative image path. Required only when type is imagelayer. | |
| parentGroupId | No | ||
| expectedMapRevision | Yes | SHA-256 revision returned by a read or preview | |
| expectedImageRevision | No | Optional current image revision pin. Allowed only when type is imagelayer. | |
| expectedDependencyRevisions | Yes |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |