Commit Graph
680 Commits
Author SHA1 Message Date
David Mann e5645b570e Merge #15154 into the merge queue batch
Actions: load every recorded Content-Aware Fill value and empty steps (#14254)
2026-11-27 12:08:36 +01:00
qvest-ssels ab2c75f621 Color Settings: only a legacy blendTextGamma of 1 loads as the box off
Settings saved before the checkbox (#14243) held one number, with 1 meaning off. Any number up to 1
loaded as the box off with 1.45, so a hand-edited 0.5 was silently replaced and not reported. Only
exactly 1 is the off sentinel now; a smaller number is reported as an invalid preference and loads
as 1.45 with the box on, as an out-of-range value in the new format does.
2026-11-26 23:47:29 +01:00
qvest-ssels ee10c0804e Color Settings: Blend Text Colors Using Gamma is a checkbox with a 1.00-3.00 field
Blend Text Colors Using Gamma was a 1.0 to 2.2 slider where 1.0 meant off, so turning it off and on lost a custom value. ColorSettings now keeps the field's value (blend_text_gamma, 1.00 to 3.00, two decimals) and the box (blend_text_gamma_on) apart; text_gamma() is what the compositor blends in (1 while the box is off), and the compositor takes up to 3.00. edit.colorSettings still takes a bool for blendTextGamma (the box alone) or a number in range (the value, and the box checked), plus blendTextGammaOn. The dialog shows the checkbox with the field beside it: typing a value checks the box, focusing does not, an out-of-range value alerts "A number between 1.00 and 3.00 is required. Closest value inserted." and an emptied field puts its value back. Settings saved as one number still load: 1 as the box off with 1.45, any other value as the box on with that value (#14243).
2026-11-26 17:22:41 +01:00
David Mann 80a19d25ee Merge #16023 into the merge queue batch
Canvas Size: a relative size in percent grows or shrinks each side by that share (#14541)
2026-11-25 17:31:41 +01:00
David Mann 92a7f23f42 Merge #16651 into the merge queue batch
Render Video: Alpha Channel option for PNG sequences (#14163)
2026-11-25 17:31:40 +01:00
David Mann 44c2a2937d Merge #16479 into the merge queue batch
Patterns paint the grey profile's greys in Grayscale documents (#14975)
2026-11-25 17:31:39 +01:00
David Mann 71f317aa2f Merge #16417 into the merge queue batch
fix(algo): HDR Toning stretches an ordinary image to the full range (#14723)
2026-11-25 14:55:28 +01:00
David Mann ec236094ca Merge #16638 into the merge queue batch
fix(tools): a pattern from an Indexed image keeps painting (#13071)
2026-11-25 13:28:24 +01:00
David Mann 8aaaa73199 Merge #16379 into the merge queue batch
Actions: play and record the Auto-Align Layers step (#14201)
2026-11-25 13:28:22 +01:00
RickiNano 580011e93e Actions: play the Auto-Align step in the full app's session (#14201)
Engine split step 8 moved Auto-Align Layers to engine-vector, so the
playback and Undo test in engine-core built a session where
`edit.autoAlignLayers` isn't registered, and no longer exercised the
real command. It moves to the engine integration tests
(`atn_auto_align_play.rs`), where `Session::new()` installs every crate's
commands, and now also checks that playing the step adds one history
state. The import and export tests stay in engine-core.
2026-11-25 07:24:53 +01:00
David Mann 349af1806f Merge remote-tracking branch 'origin/main' into HEAD 2026-11-25 01:09:11 +01:00
RickiNano 71c718f8b7 Render Video alpha: refuse unreadable scratch tiles, resolve PNG as the encoder does (#14163)
A PNG frame is flattened for its Alpha Channel choice before the export
pipeline's scratch check, which then saw only the matted copy: a failed
source read could be written as placeholder pixels. Guard the source
frame with Artboards to Files' ScratchGuard across the flatten.

The PNG check compared the literal "png", so ".png" (which the encoder
writes as PNG) skipped the option; resolve the format as io does.
2026-11-24 20:50:26 +01:00
David MannandClaude Opus 5.5 068a52e839 Tests follow craft-libs next: set copy order, edge click, no desktop pointer
- A duplicated action set goes right after its source on next.
- The Mixer test clicks inside the first green pixel: a click right on the edge maps back a hair short of it.
- Tests install NoWindows: on Windows SystemWindows tells the real mouse, which next's OS file drops follow, so the
  tab-drop test read wherever the runner's cursor was.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 20:42:16 +01:00
x-labb f5ee04545a fix(engine): Auto-Blend Layers is unavailable with a type layer or smart object selected (#14204)
Auto-Blend collected only the selected pixel layers, so with a type layer or a smart object in
the selection it blended the pixel layers and ignored the rest. The reference application
refuses: the command is not available and no history state is added.

Gives Auto-Blend its own enabled check (a type layer or smart object among the selected layers
makes it unavailable) and the same guard at the start of the run. Auto-Align keeps its check.
2026-11-24 20:40:11 +01:00
85324d2fe7 Fix-up for #11756: clippy, and keep the Pen carry-on test about carrying on
With Align Edges on by default the stroked layer renders on 20..81 and
View > Snap To pulls the y = 80 press onto that edge; the test now makes the
layer without Align Edges.

Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 13:49:03 +01:00
f2ac09d2ec Fix-up for #11756: Align Edges as the reference application renders it
The PR snapped shapes with a per-edge heuristic (pixel_align.rs, dash-cap tie
rules, a PSD coordinate-frame field threaded through engine, format and caches),
defaulted the option to off, and renamed the existing Rectangle/Triangle
"Align Edges" checkbox to "Snap Bounding Box" next to a second checkbox.

The reference application fits the whole shape at render time: the bounds of
what it paints (fill, or the stroke's outer edge) get a whole-pixel left/top
(a half rounds up) and a whole width/height, and the path is translated and
scaled into that box. Fill and stroke take one transform; curves stay
antialiased; inner edges of several subpaths are not snapped.

- photocraft_vector::align_edges implements that rule; CompiledShape applies it,
  so caches, the compositor, previews and extents agree; the fill/stroke split
  under layer effects starts from the whole shape's transform.
- Removed pixel_align.rs, the rasterizer helpers it needed, the document-space
  drag preview and psd_coordinate_frame (rounding the bounds absorbs the PSD
  quantization it was for).
- One Align Edges checkbox (ToolOptions::align_edges, stored and scripted as
  useAlignedRendering, older align_edges still read) on every shape tool and the
  Pen, on by default and after Reset Tool; it snaps the drag and sets the layer.
- PSD sn2P: written as 1 when on and left out when off, as the reference saves it.
- Dropped the dead path.set param, moved the control-protocol paragraph,
  rewrote docs/pixel-aligned-strokes.md, reverted the unrelated raw, font,
  Cargo and test-harness changes.
- Tests reproduce the measured cases (rectangles at .25/.4/.5/.6/.75, ellipse
  extremes and curve symmetry, 1/2/3 px strokes, rotated rect, Pen triangle,
  two subpaths, toggle off, stored path unchanged, one checkbox, Reset Tool).

Co-Authored-By: superplay2021 <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-24 13:02:42 +01:00
hnoerenberg 818a4a010d feat(doc): patterns record the colour mode they were defined from
Edit > Define Pattern composites the area in the document's pixel format, which stores an Indexed Color document expanded to RGB. Nothing on Pattern said where the tile came from, so a pattern taken from an Indexed image was indistinguishable from an RGB one, and a tool that cares about the difference had nothing to read.

The new field names the source mode. The pixels, the id and what the pattern library lists stay as they were. A pattern read from a file records no source: a .pat or PSD block says what its pixels are, not which document they came from. The library index and .pcraft carry the field, so a defined pattern keeps its source across a restart or a save; files written before it read as no source.
2026-11-24 11:22:16 +01:00
superplay2021 bc0560025a Merge latest main and preserve Align Edges shape edits 2026-11-24 11:58:55 +02:00
aiongg fcda1c5b4b cargo fmt --all 2026-11-24 02:41:56 +00:00
aiongg 8cd8e5e2e4 Engine split step 8: hand fixes after the test move (atn name_ref fixture, imports, core test helpers whose last users moved) 2026-11-24 02:41:56 +00:00
aiongg db03b87aba Engine split step 8: core tests that run vector commands move to the top crate's tests/it (move_tests.py output) 2026-11-24 02:41:56 +00:00
ljkx 1bf4056082 Merge remote-tracking branch 'origin/main' into fix/14975-pattern-grayscale-greys
Main's engine split step 7 moved the paint modules to crates/engine-paint and
the pattern mode tests to the engine crate's tests/it:

- cmd/fill_cmds.rs was deleted from engine-core (git saw no rename): Edit >
  Fill's pattern tile is built in PatternSpace::of_pixels(doc) in
  crates/engine-paint/src/cmd/fill_cmds.rs.
- cmd/paint_cmds.rs followed its rename.
- pattern_mode_tests.rs is crates/engine/tests/it/paint_in_pattern_mode.rs:
  the tests this branch added start from the facade's Session::new(), which
  installs the commands, like the two that moved.

# Conflicts:
#	crates/engine-core/src/cmd/fill_cmds.rs
2026-11-24 01:27:05 +01:00
aiongg bdb340c21c Engine tests before the vector cut: source cache statistics, core cache tests in core, pattern fill placement in the paint tests
Step 8 of the engine split moves the vector commands into their own crate. The
tests in those files that read core's cfg(test) counters, or test core's own
smart-object caches, are changed first:

- smart_cmds::source_cache_statistics() counts SVG source renders and native
  source bytes hashed per thread; it replaces the cfg(test) counters, and the
  test-only memo limit override goes.
- The WarningRenderSources memo tests and the native digest test move to
  core's smart_cmds source_work tests; the digest test sets up the source and
  its verified preview through the document instead of running the vector
  update, with the same assertions.
- The ignored 24 MP update timing test is removed: its memo-off pass needed a
  test-only production setting.
- rasterize_style's tests fill their layer through a local helper instead of
  core's test helper.
- The pattern placement checks for edit.fill and paint.bucket move to the
  paint tests in tests/it, where those commands are installed.
2026-11-23 22:30:00 +00:00
RickiNano 48581d833f Merge remote-tracking branch 'origin/main' into s4e-16023
# Conflicts:
#	crates/engine-core/src/cmd/image_cmds.rs
2026-11-23 22:10:12 +01:00
aiongg 3ab64de0ff Move the batch's paint-dependent core tests to the engine crate 2026-11-23 20:54:27 +00:00
RickiNano 9acb1b80b9 Merge remote-tracking branch 'origin/main' into feat/caf-action-values-14254
The engine split moved atn_cmds and batch_run to crates/engine-core, so
caf_action_values_tests.rs moves with them. Session's Actions state is now
behind ActionsExt, so the engine-core and ui-egui tests set the list
through actions_mut(). In batch_run the scratch session keeps main's
actions_mut()/recording setup and still copies the remembered Content-Aware
Fill workspace.
2026-11-23 21:23:28 +01:00
aiongg dc7005d4a4 Engine split step 7: the main batch's core tests that run edit.fill move to the top crate's tests/it 2026-11-23 19:44:48 +00:00
aiongg f226fdc42d Merge remote-tracking branch 'upstream/main' into engine-split-step7
# Conflicts:
#	crates/engine-core/src/cmd/mode_cmds.rs
2026-11-23 19:41:31 +00:00
superplay2021 47790f5e0d Merge latest main and resolve Align Edges conflicts 2026-11-23 21:25:02 +02:00
aiongg 9277ac1673 Engine split step 7: hand fixes for the moved tests (test-local copies, flate2 dev-dependency, unused imports, dead test helpers) 2026-11-23 15:08:36 +00:00
aiongg a7fd5975a5 Engine split step 7: core tests that run paint commands move to the top crate's tests/it (move_tests.py and its output) 2026-11-23 15:06:31 +00:00
RickiNano 07acb9eae8 Merge origin/main into canvas-size-relative-percent-14541 2026-11-23 15:43:30 +01:00
aiongg 1086d71fd9 Engine split step 7: engine_cut.py and its paint split (paint modules to crates/engine-paint/src) 2026-11-23 14:06:43 +00:00
David Mann 42236a89fa Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/engine-core/Cargo.toml
#	crates/ipp/Cargo.toml
#	crates/ui-egui/src/tools/analysis/tests.rs
2026-11-23 14:58:08 +01:00
aiongg 4b52711068 Merge pull request #16487 from aiongg/engine-split-cuts7
Engine tests before the paint cut: failpoints feature, setups without paint commands
2026-11-23 08:55:14 -05:00
David Mann a461a65ceb Merge remote-tracking branch 'origin/main' into HEAD
# Conflicts:
#	Cargo.lock
#	Cargo.toml
2026-11-23 13:08:36 +01:00
FredApps 17db1ba448 Merge remote-tracking branch 'upstream/main' into inbox-15255 2026-11-23 10:57:42 +01:00
aiongg e1e1eb8f01 Actions tests: a Paint Bucket step's explicit colour replays after an .atn round trip 2026-11-23 07:45:29 +00:00
aiongg cf80a283f2 Engine split step 6: cargo fmt 2026-11-23 03:28:48 +00:00
aiongg 3cbd7b155a Engine split step 6: slot_access.py and its rewrite (slot fields to accessors, trait imports, doc links)
scripts/engine_split/slot_access.py rewrites the slot fields to their accessors
(Tracked presets deref through one more *), adds the trait imports, turns
s.presets_changed() into presets::presets_changed(s) and points Session::method doc
links at the trait methods. Its fix mode applies what cargo check reports; branch
mode serves open branches and lists their edits to the moved methods. The
definition-span helpers session_state.py uses move to rust_source.py so both
scripts share them (session_state.py's output is unchanged).

This commit is split plus the fix rounds against cargo check of engine-core,
engine, ui-egui and automation (lib and tests). Part of #15710.
2026-11-23 03:28:27 +00:00
David Mann 0888f27f1d Merge #15187 into the merge queue batch 2026-11-23 02:22:08 +01:00
aiongg f9438dbdad Engine split step 5: session slots, state types in core, action recording split, prefs file document, closing hooks
- slots.rs: SlotInit, Install::slot, Session::slot/slot_mut (a missing slot is the registry's error); the preset store is the first slot (preset_store::PresetStoreExt)
- state.rs: the small Session state types and what they need; their modules re-export them
- actions_record.rs: ActionRecording (s.recording) takes the recording and playback fields out of ActionState
- action_history::history_policy_in_use; Clip::from_svg becomes edit_cmds::clip_from_svg
- prefs/saved.rs: SavedPrefs, its readers and the methods that combine preferences, colour settings and presets; ScriptEvents and ShortcutSet move into prefs
- hooks: document_closing, doc_id_reserved, pixels_edited
- tests that compare a whole ActionState also compare s.recording
2026-11-23 01:12:57 +00:00
aiongg 30bb60592b Engine split step 5: session_state.py and its rewrite (recording fields to s.recording, Clip::from_svg callers, preset store reads) 2026-11-23 01:05:50 +00:00
FredApps 01bce7a310 Merge branch 'main' into feat/param-schema-dispatch
Keep the parameter-schema dispatch, including Clean Brush refusing
unknown keys and the batch test that does not pass steps to Image
Processor. Take main's engine-core split and its new session helper.
2026-11-23 05:55:52 +07:00
aiongg bc727036dd Merge remote-tracking branch 'upstream/main' into engine-precheck-params 2026-11-22 21:47:28 +00:00
aiongg 567633c2f7 Engine split step 3: the Photoshop oracle tests install the commands first
Smart filter re-rendering looks the filters up in the command registry, and
these corpus tests create no session, so they install first like the other
tests that read the registry before a session.
2026-11-22 20:18:44 +00:00
aiongg 519a0c22a3 Engine split step 3: top crate with the wrapper Session
crates/engine keeps the package photocraft-engine: src/facade.rs re-exports
photocraft-engine-core, and its Session wraps core's and installs every engine
command. Core's Session::new() installs nothing; core gets install() and session().
The command registry keeps main's behaviour (empty before an install).

The top crate's dev-dependencies cover tests/ and examples/, including
craft-develop-model (camera raw baseline test) and photocraft-testkit (the
corpus-gated Photoshop oracle test). Dependents that need the core type or
borrowed two fields through the wrapper are fixed at the call site, and tests
that reach the registry before any session install first.

Tooling follows the package: workspace dependency, cl selection, xtask layers,
i18n report, scorecard and corpus paths, nextest overrides, ci-test-times rows,
display-names roots, prefs_usage paths, the engine split scripts, docs, and the
two release-perf steps in ci.yml.

Corpus .atn paths, the layer_menu registry read and the craft-develop-model
dev-dependency are FredApps' fixes from #16431.

Part of #15710
2026-11-22 19:29:06 +00:00
aiongg a210017995 Precheck runs the same parameter checks as dispatch
Session::precheck skipped the file.new value check that dispatch runs, so a
bad file.new passed precheck and failed only at dispatch. Both now call one
function, in dispatch's existing order.
2026-11-22 19:23:37 +00:00
Dylan M. Taylor 309e4c7a65 camera_raw: preserve legacy filter renders and native preview (#16419) 2026-11-22 12:57:39 -05:00
FredApps 7ab20d8e44 Merge branch 'main' into feat/param-schema-dispatch 2026-11-23 00:06:48 +07:00