Commit Graph
12 Commits
Author SHA1 Message Date
e66941bde1 Ignore a leading UTF-8 BOM in variable data set CSV import (#6485)
Found while testing crates/engine/src/variables_cmds.rs:285-292 (import_data_sets_text; the file is read in import_data_sets at line 279)

Co-authored-by: Claude Haiku 5.5 <noreply@anthropic.com>
2026-10-18 03:07:13 -04:00
706638b284 Tests: bad-layer-id checks use an id that can't exist (#3343) (#3351)
* Tests: bad-layer-id checks use an id that can't exist (#3343)

Layer ids come from one process-wide counter (shared with document and
smart-object ids, and bumped by ensure_ids_above on file loads). A full
`cargo test` run passes ids like 9999, so a layer a test just created can
get the "bad" id, the command succeeds and the assertion fails at random
(seen on CI in type_extra_cmds::tests::vertical_orientation_renders_columns_inside_the_canvas).

Use u64::MAX, which the counter never reaches, for every "no such layer"
sentinel in the engine and ui-egui tests. Test-only change.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* Tests: use u64::MAX for bad-layer-id sentinels added on main since (#3343)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-14 01:59:43 -04:00
7c9e7e5ae3 Keep the type style when a data set replaces text (#2742) (#2785)
Applying a textReplacement value cleared the layer's character and
paragraph runs, so the text re-flowed from the summary fields (family,
size, colour) and lost weight, italic, tracking, underline, caps and the
rest of the run style. The new text now takes the first character's style
and the first paragraph's settings, as in Photoshop. The value is kept
verbatim, as before.

Co-authored-by: Fabio Lussi <198260595+itrycodinganditsbad@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-10 18:31:50 -04:00
BenzizaandGitHub 0b4fe4b17f Keep As Is when reusing variable definitions (#2655) 2026-10-10 15:16:42 -04:00
Harrison O'Connor-HooverandGitHub 7cd42907e5 Reject colliding data-set export filenames before writing (#2433) 2026-10-10 13:14:39 -04:00
Harrison O'Connor-HooverandGitHub 2db1b26d9d Preserve quoted multiline variable CSV records (#2242) 2026-10-10 02:17:09 -04:00
TiredIsaandGitHub 7567a20ac3 fix(engine): preserve Unicode in variable data-set CSV (#1062) 2026-10-08 15:33:11 -04:00
Ian SwopeandGitHub 8f5a0817e4 Applying a text data set re-renders the type layer instead of blanking it (#990) (#1025)
apply_to_doc replaced a text-replacement variable's text and set the layer's
render cache to None, but nothing rebuilt it. The compositor draws a type
layer from that cache, so the text vanished from the canvas after
image.applyDataSet and from every file written by
file.export.dataSetsAsFiles. The layer is now re-rendered with
type_cmds::refresh, as type.edit does.
2026-10-08 14:30:50 -04:00
Brandon ThomasandClaude Opus 5.5 f7eb6ea9e7 Format: adopt the craft-family rustfmt.toml and format the workspace
CI's `cargo fmt --all -- --check` has failed on every run because the
repo had no rustfmt config and was never formatted. Use the same settings
as EffectCraft/FilmCraft (max_width 160, use_small_heuristics Max), which
also keeps the churn small. Formatting only; no code changes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-04 11:31:17 -04:00
Brandon ThomasandClaude Opus 4.8 2b6189fc86 Data-set export: filename template ({name}/{index}/{document})
file.export.dataSetsAsFiles gains a naming template so agents control
batch output filenames (e.g. row-{index}). Default {name}. Test covers it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-02 21:42:04 -04:00
Brandon ThomasandClaude Opus 4.8 81b995ce17 inspect: report Variables/Data Sets in document.inspect
Agents can verify a data-driven setup (variable names+layers, data-set
names, active set) in one inspect call. Test covers it.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-02 20:43:50 -04:00
Brandon ThomasandClaude Opus 4.8 79fd79c2ae Variables and Data Sets: data-driven graphics (Image > Variables, data-set import/export)
Clean-room implementation of Photoshop's data-driven graphics, headless
and scriptable for CLI/MCP batch generation:
- doc: Variables model (visibility/text/pixel-replacement bindings + named
  data sets), threaded through .pcraft (manifest + convert).
- engine variables_cmds.rs: image.variables.define, image.variables.dataSets,
  image.applyDataSet (visibility/text/pixel replace w/ fit/fill/conform/as-is
  + 9 alignments, one history step), file.import.variableDataSets (CSV),
  file.export.dataSetsAsFiles (apply each set and export), variables.list.
- Pixel replacement loads+scales+aligns an image into the layer bounds via
  the existing resample helpers.
- 7 tests (doc round-trip + lookups; engine define/apply, CSV import, export,
  pixel replace, bad params). Parity 600 -> 605; FLOOR 600.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-02 16:43:22 -04:00