Commit Graph
2131 Commits
Author SHA1 Message Date
aiongg a94321e0f3 refactor(engine): move filters/validation.rs tests to filters/validation/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 038c3745cf refactor(engine): move extra_cmds.rs tests to extra_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 0e2ee0a858 refactor(engine): move image_cmds.rs tests to image_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg fb63ad5f7d refactor(engine): move photo_cmds.rs tests to photo_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg b6f8d5227f refactor(engine): move smartselect_cmds.rs tests to smartselect_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg c46f273c85 refactor(engine): move filters.rs tests to filters/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 7224203641 refactor(engine): move selection_cmds.rs tests to selection_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 50e27b0f41 refactor(engine): move actions_cmds.rs tests to actions_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg aad7e989e3 refactor(engine): move warp_cmds.rs tests to warp_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 19dd5d25f8 refactor(engine): move align_cmds.rs tests to align_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 740db3772a refactor(engine): move layer_multi_cmds.rs layers_panel_parity_tests to layer_multi_cmds/layers_panel_parity_tests.rs 2026-10-26 22:30:12 +00:00
aiongg 31899852e3 refactor(engine): move layer_multi_cmds.rs tests to layer_multi_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg f3e5fb68d6 refactor(engine): move fill_cmds.rs tests to fill_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 88daf5e501 refactor(engine): move paint_cmds.rs tests to paint_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 356baadcf7 refactor(engine): move layer_style.rs tests to layer_style/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 5fd2de8ac2 refactor(engine): move sampler_cmds.rs tests to sampler_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg c58e8a6fe2 refactor(engine): move adjust_params.rs tests to adjust_params/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 3f4d8ee025 refactor(engine): move brush_preset_cmds.rs tests to brush_preset_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg a1c0862613 refactor(engine): move edit_cmds.rs tests to edit_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg c0c06bc58a refactor(engine): move type_cmds.rs tests to type_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 56a7e9ab47 refactor(engine): move transform_cmds.rs tests to transform_cmds/tests.rs 2026-10-26 22:30:12 +00:00
aiongg 640d35c19a refactor(engine): move src/presets/mod.rs to src/presets.rs 2026-10-26 22:13:07 +00:00
Dylan M. Taylor a0ce166acd refactor: lower cognitive complexity in styles apply, affinity text read and warp identity 2026-10-26 16:01:43 -04:00
Dylan M. Taylor d3b0a76c3f lint: drop blank lines after doc comments and attributes; tidy IME else, closure, shell tests (#9576)
- Remove blank lines between doc comments or #[test] attributes and the item (S8855, S8856)
- type_tool: drop the redundant else after continue in the IME event arm (S8862)
- ui_state: pass OsStr::to_os_string instead of an equivalent closure (S1612)
- macos packaging: [[ ]] for the attempt test (S7688); bind validate_staple's argument to a local (S7679)
2026-10-25 22:08:50 -04:00
aiongg da02d0ef2d Merge remote-tracking branch 'upstream/main' into docking-adopt
# Conflicts:
#	Cargo.toml
#	crates/ui-egui/Cargo.toml
2026-10-26 00:12:23 +00:00
aiongg cece50d513 Merge pull request #9386 from davidmann4/integration-batch-8
Integration batch 8: 37 reviewed community PRs on main
2026-10-25 20:04:41 -04:00
Dylan M. Taylor 3877bb1dbe chore: resolve SonarCloud maintainability issues (#9044)
* chore: resolve SonarCloud maintainability issues

* fix: format imports and fix effect_entry argument type

* fix: restore test closure and wildcard import that broke compilation

* refactor: split composite_to_surface to reduce cognitive complexity
2026-10-25 19:38:31 -04:00
0f8521851e Integration: Vanishing Point clone dabs stay on the canvas (#3281)
Clone strokes painted every dab where its points lay, up to 1e7 px off
the canvas: on the layer itself without "newLayer", and on the work
surface with it, so each far dab allocated up to 4096x4096 px of tiles.
A stroke with points [[100,100],[-30,100],[9e6,9e6]] on a 200x200
canvas painted 3 dabs and left pixels left of the canvas. The dabs are
now cut to the canvas before any read or write.

Found by CodeRabbit on #9386.

Co-authored-by: Valentin Klein <271991477+vangel76@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-25 21:56:00 +01:00
Dylan M. Taylor 669a7f8a94 feat(updates): add startup self-update prompt modal (#9322)
* feat(updates): startup update prompt modal and direct self-updating

Release checks and the install go through craft-update's Updater: the engine's Help ▸ Check for Updates command keeps its status machine, its transport asks craft-update instead of a private GitHub client, and a found release opens the startup prompt. An install holds back while documents are unsaved, and a finished update closes through the guarded close path. craft-update stays out of the wasm build.

Ref: storytold/craft-libs#319

* fix(updates): address review feedback

Wake the UI when a manual check is queued from a menu callback; the update prompt owns the keyboard while it is open (LightCraft); Download opens through the desktop URL hook (FilmCraft); the Help menu dispatches through menus::invoke (FigCraft); print jobs and comment drafts hold an install back (WordCraft); Check for Updates is a registered command (GridCraft); an install holds back while documents are unsaved.
2026-10-25 15:55:45 -04:00
David MannandClaude Opus 5.5 8812fe1e73 Merge main (egui 0.37, #9363)
Conflicts: the batch's wheel reads (#5547 Animated Zoom) keep their extra
argument with main's ids (`Id::unique`, `ui.scope_id()`); crop presets keep
#6620's `apply_choice` with main's accessible name; Bevel & Emboss keeps
#9370's per-mode id with main's name argument; the Stroke field keeps
#7203's gradients with main's name; tone.rs keeps #9139's move of the
Histogram panel to histogram_panel.rs (main only renamed ids there);
translation catalogs as unions.

Not flagged by git, the batch's new code follows egui 0.37 too: dropdowns
take an accessible name (Histogram Channel/Source #9139, tool Mode #5504,
Art History Style #1610, New Snapshot From #3567), MouseWheel events carry
`source`, `WidgetType` is `Role` (ColorButton is ColorWell, #7203),
`Id::new`/`Ui::id` are `Id::unique`/`Ui::scope_id`.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-25 20:53:11 +01:00
5c9192bbe2 Migrate PhotoCraft to egui 0.37 (#9363)
* egui037: name each control for what it sets, and order the eager fonts for the UI

CodeRabbit review follow-ups on the migration: the Artboard X/Y fields, the CAF
dropdowns, the channel Solidity field, the GPU backend/adapter dropdowns, the
corner radius fields and the canvas extension colour all had an accessible name
that named another control (or was shared by four). The eager craft-fonts
registration now puts the UI Japanese face first, as the lazy loader does, so
Japanese UI is not drawn in the manifest's Mincho face and shared Han characters
do not take Japanese forms.

Generated with Codebuff
Co-Authored-By: Codebuff <noreply@codebuff.com>

* egui037: rustfmt the eager craft-font order

---------

Co-authored-by: Dylan M. Taylor <dylan@dylanmtaylor.com>
Co-authored-by: Codebuff <noreply@codebuff.com>
2026-10-25 15:04:35 -04:00
David Mann 6baf1586ba Merge PR #1610: Art History Brush in the Y-group flyout 2026-10-25 19:50:57 +01:00
7e98763436 Integration: Art History Brush source sampling, History source, erased patches, silent no-op, Normal mode only (#1610)
- Each tile still copied a source window of (tile +- halo) clipped to the
  dab bounds, but a rotated read can land up to a dab diameter away: a
  leftward drag [[110,40],[20,40]] at size 40 read empty pixels at x = 64
  (seam), and a large click still copied about the whole dab per tile.
  The stamp now samples the history state directly (no window, no
  StampParams::halo), and bilinear reads at pixel centres, so an
  unrotated dab copies the history pixel instead of a 2x2 blend.
- Tolerance compared colour only, so an erased patch (the Eraser keeps the
  colour, lowers alpha 1 -> 0.6) was skipped at tolerance 25: the
  difference is now the larger of the mean colour change and the alpha
  change.
- The brush had its own history lookup (row 0 unless `state` was passed):
  it now uses the History Brush's source (history.setSource, snapshots,
  redo rows, refusal after a canvas size change).
- A stroke that wrote nothing at tolerance 0 (wholly outside the
  selection, or on Lock Transparency over transparent pixels) failed
  with "no stroke points"; it is now the same quiet no-op as a stroke
  under the tolerance (damage null, no History step).
- A mode other than Normal (agents only: the options bar sends none)
  blended each dab with the already-mixed result at full strength, so
  Multiply with a white source over 0.5 grey fell to 0.33 five pixels
  from a dab's centre instead of staying 0.5. Other modes are refused
  until the stroke is buffered, and the wrong path is removed.
- TOOL-213-20 is partial (8 of 10 styles, Area scales spacing); docs follow.

Co-authored-by: Matt Van Horn <455140+mvanhorn@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-25 19:48:32 +01:00
aiongg 292f869d8a Merge remote-tracking branch 'upstream/egui037' into docking-adopt
# Conflicts:
#	Cargo.lock
#	Cargo.toml
#	crates/ui-egui/src/gallery_ui.rs
#	crates/ui-egui/src/layer_props_ui.rs
#	crates/ui-egui/src/lib.rs
#	crates/ui-egui/src/panel_docking.rs
#	crates/ui-egui/src/panel_docking_tests.rs
#	crates/ui-egui/src/view_cmds.rs
#	crates/ui-egui/tests/it/batch_export_options.rs
2026-10-25 17:51:11 +00:00
Matt Van Horn 45c303ba5c Art History Brush: count only the sampling margin against coverage
The stamp now reads each dab's bounds plus one pixel, but the coverage
check still inflated the stroke bounds by the full halo, so a single
Loose Curl click of size 1400 or more on a 2600x2600 canvas failed with
"stroke too large". Inflate by one pixel instead, and add a test for
size 2000 Loose Curl and size 2400 Tight Medium clicks.

Also make the documented tolerance default match the engine's (0).
2026-10-25 10:47:09 -07:00
aiongg e3f242af38 Merge remote-tracking branch 'upstream/main' into docking-adopt 2026-10-25 16:25:21 +00:00
David Mann c01dc04b5f Revert "Merge PR #4573: Interface: Animation Effects follows the system setting, or is on or off"
This reverts commit acd7e07252, reversing
changes made to bc0354db5d.
2026-10-25 16:36:09 +01:00
David MannandClaude Opus 5.5 14693eb085 Integration: merge main 528491f9a, resolve conflicts
- crates/engine/src/edit_cmds.rs: copy_mask keeps #3297's filter-mask target and takes main's
  clipboard `source` (#8945).
- crates/cms/src/lutfile.rs: #9183's shaper doc comment next to main's UTF-16 decode_text (#9129).
- contributors/people.toml, docs: unions.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 16:26:06 +01:00
David Mann ff479a2c01 Merge PR #9139: Rebuild the Histogram panel
# Conflicts:
#	crates/ui-egui/src/control.rs
#	docs/scorecard.md
#	docs/ui-parity.md
2026-10-25 16:11:31 +01:00
David Mann ef98aa507a Merge PR #3281: Vanishing Point: tear off planes and clone in perspective (#3280) 2026-10-25 15:57:43 +01:00
David MannandClaude Opus 5.5 5a9a8ff9e8 Integration: History Brush source tests take snapshot 0 as the opening snapshot (#3567)
#3567 makes the document as opened snapshot 0, so {"snapshot": 0} is a valid source now;
main's bad-params test still listed it as an error.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
2026-10-25 15:52:03 +01:00
David Mann 7b79f70787 Merge PR #3297: Smart Filters: paint the filter mask directly, with undo (#3290)
Merged with our fix-up pr-3297-fixup (1de1e9eb58) on top of the author's head 053e1e0d03.
Conflicts resolved: channel_cmds.rs routed() keeps the PR's PAINT_IDS list plus the batch's
paint.artHistoryBrush; paint_cmds.rs Paint Bucket params keep the batch's "mode" and the PR's
"filterMask" target; docs/scorecard.md takes the batch's numbers with FILE-215-3 done.
2026-10-25 15:42:51 +01:00
eb4494b915 Integration: VP preview keyed to its document, OK paints the session's layer (#3281)
Vanishing Point is not modal, so the Layers panel and menu commands stay
usable while it is open. The stamp preview kept painting over the document
as it was when the mode opened, and OK painted whichever layer was active
by then: stamp on layer 1, click layer 2, and the canvas still showed
layer 1 while OK cloned onto layer 2 (a filter run meanwhile was hidden).
filter.vanishingPoint now takes an optional `layer` (the UI passes the
session's when another layer was picked, so recorded actions stay
portable) and makes the painted layer active, so Fade and a colour-channel
target follow it. The preview repaints over the document as it is now when
its pixels change (the canvas syncs it before drawing, so no frame goes
without the strokes); a selection or view change keeps it as it is.

display_doc's VP branch is also keyed to the session's document, as main's
Puppet and Perspective Warp branches are (#5115): a document opened in the
same frame no longer shows the other document's strokes.

Co-authored-by: Valentin Klein <271991477+vangel76@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 15:29:02 +01:00
1de1e9eb58 Integration: keep the filter mask target to commands that edit it (#3297)
Redone on the PR head 053e1e0d0 (the author's main merge); the earlier
fix-up f7af09d0f carried the first six points.

With a smart object's filter mask targeted, every routed command got
"target":"filterMask" and the filter-mask precondition instead of its own:

- Cmd+T and Edit > Transform > Flip/Rotate failed ("can't transform a
  filter mask on its own"); now the smart object transforms, as in
  Photoshop (lone_target -> Ok(None), and transforms get no target).
- Move (layer.translate) re-rendered the whole filter stack on every
  nudge, and failed for contents that can't render.
- Convert for Smart Filters became enabled and nested the smart object;
  Apply Image, Last Filter, Liquify, the lens filters, Vanishing Point,
  the render filters and Desaturate ignore the target.
  `follows_filter_mask` now leaves these out, in the shell, in
  inject_target, in the precondition and in the re-render hook; Paste
  keeps its own precondition.
- With the filter mask shown (Alt-click), clicking the layer, layer-mask
  or vector-mask thumbnail (or ui.set maskTarget/vectorMaskTarget/
  filterMaskTarget:false) left the view on (and ui.set maskTarget:false
  left the filter mask targeted), so strokes kept landing in
  the filter mask; those now end the view (CodeRabbit, panels.rs).
- ui.set filterMaskTarget:true on a layer without smart filters, or with
  a single channel targeted, cleared the mask target and answered ok; it
  is now refused before anything changes (CodeRabbit, control.rs).
- Curves on a targeted filter mask showed colour channels and the smart
  object's histogram; it is now a gray plane with the mask's histogram
  (GraySurface::FilterMask).

New on this head:

- Filters with a parameter schema (Gaussian Blur, High Pass, ...)
  refused "target":"filterMask" ("`target` must be pixels, mask,
  quickMask or {channel}"), so blurring the filter mask, the usual way to
  feather it, failed from the menu, the dialog and agents. The filter
  validation now accepts it (blurring_the_filter_mask_feathers_it).
- Delete with a selection and the filter mask targeted ran Edit > Clear
  on the smart object ("not a pixel layer"); it now fills the filter mask
  with the background colour there, as Photoshop does. With no selection
  Photoshop deletes the layer, which Delete already did
  (delete_with_the_filter_mask_targeted_edits_the_filter_mask).
- docs/control-protocol.md: the ui.set line lost its closing parenthesis
  in the main merge.

Co-authored-by: Valentin Klein <271991477+vangel76@users.noreply.github.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 15:21:05 +01:00
David Mann bb39b4a8dd Revert "Merge PR #1199: Add optional local models for subject matting and object selection"
This reverts commit 5f2a7b9903, reversing
changes made to 9ef4c0a487.
2026-10-25 15:19:27 +01:00
Justin John ab2508d6af fix(atn): preserve unsupported event kinds (#8509)
* fix(atn): preserve unsupported event kinds

* fix(atn): reject invalid event kind metadata
2026-10-25 10:19:19 -04:00
David MannandClaude Opus 5.5 121a2407ff Engine: assets_dir's doc comment back on assets_dir (#9390) (#9391)
has_pixels was inserted between assets_dir's doc line and the function,
so rustdoc attached both lines to has_pixels.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 10:19:13 -04:00
David MannandClaude Opus 5.5 2c4982f2d2 Export Data Sets as Files keeps outputs in the chosen folder (#9420) (#9422)
* Export Data Sets as Files keeps outputs in the chosen folder (#9420)

{document} was the document name verbatim, so a document named
../esc/aped.psd wrote outside the chosen folder; separators and reserved
characters in it now become _. A data set named after a Windows device
(nul, CON) gets the same _ every other exporter gives it (nul_.png).

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

* Export Data Sets as Files: a document stem of . or .. becomes _ (#9420)

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

* Address CodeRabbit review: data-set names check every folder, an empty stem is _

A device-named document under `{document}/{name}` made a `nul` folder,
since the device check saw the whole path; it now checks each component.
A document named `.` has an empty stem and gave `.png`; it becomes `_`
like `.` and `..`. The test uses a temp dir that cleans itself up.

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 10:19:01 -04:00
David MannandClaude Opus 5.5 00d0deaeac Reveal All: ignore erased, fully transparent pixels (#9379) (#9380)
* Reveal All: ignore erased, fully transparent pixels (#9379)

The Eraser only clears alpha, so an erased pixel keeps its colour bytes
and Surface::content_bounds counted it: Reveal All (and the Crop tool's
beyond-canvas preview) grew the canvas to pixels nothing shows. Count
only pixels with alpha > 0 outside the canvas, as Photoshop's layer
bounds do.

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

* Reveal All: scan only off-canvas pixels, in parallel (#9379)

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

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 10:18:48 -04:00
DuBearteandClaude Opus 5.5 28e5efa888 Paste: centre pixels copied from another document (#8945) (#9353)
Paste kept clipboard pixels where they were whenever that spot lay on
the canvas, whichever document they came from: a whole small document
copied into a larger one landed in its top-left corner. The clipboard
now remembers its source document; Paste keeps pixels in place only
there and centres them in any other, as it already did for pixels that
don't fit. Images from other apps have no source and centre too. Paste
in Place is unchanged.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-25 10:18:30 -04:00