Preview a native TSX write
tiled_preview_write_tsxSerializes a restricted-profile .tsj tileset to TSX bytes matching Tiled's native exporter. Returns an expiring file change set for review and approval.
Instructions
Serializes one restricted-profile project .tsj atlas tileset to TSX bytes matching Tiled 1.12.2's own writer byte for byte. The declared grid must be derivable from the declared image size, margin, and spacing (the official exporter recomputes it, so a disagreeing declaration fails closed rather than drifting); per-tile metadata, wang sets, custom properties, and unknown members also fail closed. The image reference carries verbatim, so the .tsx target must be a new file in the source tileset's directory. Returns an expiring fileExport change set whose producer is the native serializer; apply re-serializes under the pinned source revision and fails closed unless the bytes exactly match the approved content hash. No Tiled CLI is involved.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| targetPath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| tilesetPath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| projectFilePath | No | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| expectedTilesetRevision | Yes | SHA-256 revision returned by a read or preview |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |