Preview a native TX write
tiled_preview_write_txSerializes restricted-project object templates to TX bytes matching Tiled 1.12.2's format, returning an expiring change set for approval.
Instructions
Serializes one restricted-profile project .tj object template to TX bytes following Tiled 1.12.2's writeObjectTemplate exactly: a bare root with the base object serialized without id, x, or y, through the same object writer verified byte-exactly against official TMX exports. Tile templates (which carry a tileset) and nested templates fail closed, matching the template reading profile. The .tx target must be a new file in the source template'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 | |
| templatePath | Yes | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| projectFilePath | No | Canonical project-relative POSIX path; absolute paths and .. are forbidden | |
| expectedTemplateRevision | Yes | SHA-256 revision returned by a read or preview |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |