Skip to content

Issue #1268: Copy Settings picks single masks; repeated automatic mask names get a number - #1278

Merged
emmertex merged 1 commit into
emmertex:mainfrom
RAD-Films:feat/copy-settings-pick-masks
Nov 18, 2026
Merged

emmertex merged 1 commit into
emmertex:mainfrom
RAD-Films:feat/copy-settings-pick-masks

Conversation

@OneSlips

Copy link
Copy Markdown
Collaborator

Fixes #1268

Problem

Copy Settings copies all of a photo's masks or none. With several masks on a photo that is rarely what is wanted: AI masks (a subject, a sky, a person's eyes) carry over well to the next photo, while a brush mask painted for one frame does not. Working through a set of similar frames, the photographer has to paste everything and then delete the masks that don't fit, photo after photo.

Masks of the same kind also share one automatic name, so two radial gradients on a photo can't be told apart in a list.

Change

What changes for the photographer

  • In Copy Settings, Masking now opens with its arrow like the other groups and lists each mask of the photo with its name and what it is made of: Radial Gradient + Brush, Linear Gradient, Radial Gradient 2. Tick the masks to copy. The Masking box shows a partial tick when only some are picked; Check All and Check None work as before.
  • A mask whose automatic name another mask of the photo already has gets a number: the second radial gradient is Radial Gradient 2. Names given by the photographer and names that came with an import stay as they are; a numbered name keeps its number while the mask selects the same thing.

How it works

  • develop.copy takes an optional masks: [maskId] next to groups / settings. Without it every mask is copied, as before, so presets, Auto Sync, Paste, Sync, the CLI, the control channel and MCP behave as they did. The mask choice is for that copy only (mask ids belong to one photo); the group choice is still remembered. The reply lists the copied ids when masks is given.
  • The copied masks keep their ids, so Paste links each copy to its own original exactly as a full copy does (link_copied_masks), in the photo's order. AI masks still travel as recipes.
  • masks with an id the photo doesn't have, a malformed list, or without the masks group is an error; the clipboard and the remembered choice stay as they were.
  • Naming: refresh_mask_names (run on every mask edit) numbers an automatic name only when it is being (re)assigned and another mask already has it. New Preset recognises a numbered automatic name, so a preset still names its masks after itself.
  • The dialog keeps only the unticked mask ids (Dialog::CopySettings::masks_off, empty = all) and sends the ticked ids to develop.copy. No new UI strings: the rows show mask names and the shape names the Masking panel already shows.

Not in this PR: Paste, Sync and Auto Sync dialogs are unchanged and take every mask that was copied. Renaming masks by hand is unchanged.

How it was checked

  • cargo xtask ci --quick on b3e8846 (Windows, 18 Nov, commit d006c54): fmt, brand, quarantine, docs, notes, i18n and clippy pass; all lcc-develop and lcc-engine tests pass. The test step fails on 13 lcc-ui-egui tests that this change doesn't touch (face and people pages, display profiles, HDR preview, missing face strings, an em dash in a What's New entry, a ▸ in locales/fork/cs.json). 11 of them failed the same way on other branches from the same base that night. Rerun alone, previews_follow_the_screen_profile_while_none_is_chosen passes (it fails only under load). panels::suggested::tests::the_groups_hold_each_persons_suggested_faces_until_they_are_decided fails on its own ("ann" vs "Ann"), in a file this PR doesn't change. cargo xtask sil was not run on its own. Main has since merged Raw: decode Nikon NEFX (merged pixel shift) #1267; this branch merges with it without conflicts and was not re-run on it.
  • Tests that fail without this change: recipe::tests::automatic_names_are_numbered_only_where_they_would_repeat (lcc-develop); tests_mask_links::copy_takes_a_subset_of_the_masks_and_paste_links_just_those and tests_mask_links::automatic_mask_names_get_a_number_only_where_they_would_repeat (lcc-engine); tests_copy_paste_dialogs::copy_settings_picks_single_masks (lcc-ui-egui; drives the dialog's widgets: Check None, open Masking, tick two of three masks, Return, paste, Check All).
  • Ran the app and looked at the result (debug build, demo library, a test copy with no prefs): three masks on one photo (Radial Gradient + Brush, Linear Gradient, Radial Gradient 2). Copy Settings with Check None and two masks ticked shows Masking with a partial tick. The paste onto the next photo puts on just those two, in order, each sharing a link with its original; the unticked mask stays unlinked.

Screenshots

A screenshot of the dialog with Masking opened (procedural demo photo) can be added here on request.

Merging

Checklist

  • No new panic path in non-test code (an unknown mask id is an error)
  • No new text on screen
  • The feature's rows in docs/parity-checklist.md are updated
  • The manual is not updated
  • New code has a caller
  • No assets added
  • Ready to merge

🤖 Generated with Claude Code

…mask names get a number

- develop.copy takes `masks` (mask ids) next to groups/settings: only those of the photo's
  masks are copied, in the photo's order, linked to their originals on paste. Without it every
  mask is copied as before (presets, Auto Sync, CLI, control channel and MCP unchanged). An id
  the photo doesn't have, a malformed list or `masks` without the masks group is an error.
- Copy Settings lists the photo's masks under Masking (arrow, as the single settings), each with
  its name and what it is made of ("Mask 2: Radial Gradient, Brush"); Check All / None work.
- refresh_mask_names numbers an automatic name another mask of the photo already has
  ("Radial Gradient 2"); given, imported and unchanged names stay. New Preset still recognises
  a numbered automatic name.

Issue emmertex#1268.

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

Copy link
Copy Markdown

if this works like i imagine, it is even better than lrc

@emmertex emmertex left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed: numbered automatic mask names, per-mask picking in Copy Settings (UI + develop.copy masks param). Hostile mask ids are validated (negative, huge, non-numeric, unknown, masks without the group), failed copies leave clipboard and remembered pick untouched; tests cover it. Release notes + parity row updated. CI green.

@emmertex
emmertex merged commit 56a7964 into emmertex:main Nov 18, 2026
5 checks passed
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.

[Suggestion] Give Masks unique name (eg. Mask 1, mask 2 etc.) and make individual masks selectable in Copy Settings UI

3 participants