Skip to content

feat(adjustments): apply every adjustment to all picked layers - #70

Open
Zorienu wants to merge 34 commits into
artcraft-android:mainfrom
Zorienu:adjust-multiple-layers
Open

Zorienu wants to merge 34 commits into
artcraft-android:mainfrom
Zorienu:adjust-multiple-layers

Conversation

@Zorienu

@Zorienu Zorienu commented Nov 6, 2026

Copy link
Copy Markdown
Contributor

Adjustments now change every picked layer, not only the current one.

What now works

  • Hue/Saturation/Brightness, Curves, Gradient Map, Color Balance
  • Blurs, Noise, Sharpen, Bloom, Glitch, Halftone, Chromatic Aberration
  • Pencil: the painted mask applies to every picked layer
  • Liquify: each picked layer's mask moves with it
  • Clone: each picked layer clones from its own pixels

One undo puts every changed layer back.

How

  • The chosen paint layers are kept in State::adjust_targets for the
    whole adjustment.
  • The filter pass runs once per layer, with its own uniform, blur source
    and target.
  • Pencil rebinds every layer to the painted mask; keeping or restarting
    a stroke begins the whole target set again.

Scope

Plugin filters stay on the current layer. Their runner draws one layer at
a time with its own timeouts, so multi-layer plugin runs need a separate
design.

Locked, hidden and text layers are skipped.

Testing

  • cargo test -p procraft-core --lib picked_layers_
  • cargo test -p procraft-core --lib -- --skip plugin_filter::tests
  • cargo check --workspace
  • Clippy and formatting pass

The two plugin_filter::tests failures also fail on HEAD; they are
unrelated to this change.

Try it

Pick two layers, run Gaussian Blur, then Liquify, then Clone.

Zorienu and others added 30 commits November 5, 2026 22:12
An adjustment now starts on every chosen paint layer, not only the
current one, and keeps that target set for its whole life.

- Keep the target layers in `State::adjust_targets`, cleared when the
  adjustment ends.
- Pencil rebinds every layer to the painted mask, and baking or
  restarting a stroke begins the whole target set again.
- Liquify pushes each target layer's mask along with it.
- Clone follows the multi-layer pencil path.
- Filter plugins stay on the current layer: their runner draws one
  layer at a time.
- Cover the paths with picked-layer tests for HSB, blur, pencil,
  Liquify and Clone.
A painted-on adjustment committed its undo step from the primary
layer only, so the other picked layers stayed adjusted after undo and
their noise was folded into their original dot's step.

The painted branch of TransformEnd now keeps a snapshot for every
layer it ends, all within the painted rectangle. One undo puts the
whole stroke back on every layer.

Adds a regression test: two picked layers, two pencil strokes, one undo
and one redo.
…g set loads without freezing the canvas (discord)
…d#74)


Co-authored-by: Hekel1989 <28776601+Hekel1989@users.noreply.github.com>
…clock, so a blocked call can't hold its cover up (artcraft-android#68)


Co-authored-by: cirokk <64557955+cirokk@users.noreply.github.com>
…on, so lint passes (artcraft-android#76)


Co-authored-by: lashmanRB <16557619+lashmanRB@users.noreply.github.com>
…y when set to, and read full-size grains and shapes (artcraft-android#88)


Co-authored-by: Zorienu <35647138+Zorienu@users.noreply.github.com>
… set relative to the stroke (artcraft-android#85)


Co-authored-by: Naitrate <64479044+Naitrate@users.noreply.github.com>
…stays over the bars (artcraft-android#86)


Co-authored-by: radioactiveroach <80217949+radioactiveroach@users.noreply.github.com>
…fills and pictures, show in X-Ray, Preview and the Reference window, and share whole
@Zorienu

Zorienu commented Nov 7, 2026

Copy link
Copy Markdown
Contributor Author

@bearinmindcat can you review this one please? 👀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants