Skip to content

LR-MASK-EFFECTS: local adjustment presets with Lightroom Classic import - #1062

Merged
echelon merged 5 commits into
storytold:mainfrom
OneSlips:pr/mask-effects
Oct 15, 2026
Merged

echelon merged 5 commits into
storytold:mainfrom
OneSlips:pr/mask-effects

Conversation

@OneSlips

@OneSlips OneSlips commented Oct 11, 2026 •

Copy link
Copy Markdown
Contributor

Split out of #1012 at a reviewer's request. This PR holds only the local adjustment (mask effect) presets; the DCP camera profiles, preset performance, and GPU/grain work are in separate PRs.

What it adds (LR-MASK-EFFECTS)

Masking panel → Effect menu (above the mask sliders)

  • Grouped (★ Favorites first, then groups), searchable, scrolls, works with ↑ ↓ Return.
  • Marks the matching effect (or Custom). Resting the pointer on an effect previews it on the photo.
  • Right-click an effect to apply it to all masks or to the same-named mask on the selected photos (one undo step), or to update, rename, duplicate, star, move to a group, or delete it (asks first).
  • Also has Reset Sliders and Update "" with Current Settings.

New Effect Preset dialog: name, group, which sliders it saves (All / None / Changed Only), Amount, and brush size/feather/flow.

Manage Effect Presets window: search, inline rename, update from the mask, duplicate, stars, groups, export, and delete with confirmation.

Engine

  • Groups, favorites, and partial presets (only some sliders, with or without Amount).
  • New commands: mask.updateEffect, renameEffect, duplicateEffect, favoriteEffect, setEffectGroup, renameEffectGroup, toolEffect, importEffects, exportEffects.
  • mask.applyEffect takes several masks, all masks, or the same-named masks on the selected photos, as one undo step.
  • A new mask starts with the effect last applied to a mask of its kind (brush, linear, radial…). This is kept with the library.

Import formats

  • Lightroom Classic .lrtemplate with type = "LocalizedAdjustmentPreset".
  • Camera Raw local-correction .xmp.
  • Our own .lceffect (also written by export).
  • .zip bundles of any of these.

These come in through mask.importEffects, preset.import, File → Import Profiles & Presets…, and drag & drop. Import also:

  • turns folders and LrC divider presets (10 ----- DETAIL ----- 10) into groups;
  • reports settings that have no local slider here (Grain, Point Color, toning luminance) in the toast and keeps them with the effect for export, without applying them;
  • returns an error, never a panic, for a malformed file.

I tested import against 61 real Lightroom Classic local templates, opened read-only. None are committed: the tests build their fixtures in code.

Docs

  • docs/parity-checklist.md: new LR-MASK-EFFECTS row; LR-IMP-PROFILES and LR-MASK-SLIDERS notes updated; summary refreshed with cargo xtask parity --write.
  • docs/xmp-interop.md: new Local adjustment presets (mask effects) section, and the Import row updated.
  • New messages are translated in every locale catalog.

Tests

  • crates/engine/src/tests_mask_effects.rs
  • tests_prefs::mask_effects_*
  • crates/ui-egui/src/tests_mask_effects.rs
  • tests_masking::effect_dropdown_applies_saves_and_shows_the_matching_effect

Local verification (Windows)

Merged with upstream main on 2026-10-13 (which includes the Windows fixes from #1052). cargo xtask ci passes all 8 steps on Windows: fmt, clippy, heif, test, parity, layers, assets and wasm. The merge conflicts were only in the locale catalogs and docs/parity-checklist.md; the summary was refreshed with cargo xtask parity --write.

🤖 Generated with Claude Code

OneSlips and others added 3 commits October 12, 2026 02:32
…et import

Named sets of local adjustment sliders, picked from a new Effect menu
above the mask sliders in the Masking panel (apply sets every slider and
keeps Amount; save current; import; right-click delete; the menu names
the matching effect, else Custom). Saved with the library preferences.

Commands: mask.effects, mask.applyEffect, mask.saveEffect,
mask.deleteEffect, mask.importEffects, mask.exportEffects (.lceffect).

Lightroom local adjustment presets (.lrtemplate with type
LocalizedAdjustmentPreset) are read by mask.importEffects and routed
there by preset.import / File > Import Profiles & Presets, which used to
reject them as having no develop settings. Their lower-camel Local* keys
map through the same table as XMP mask fields (crs_masks::local_values);
sliders without a counterpart (toningLuminance, grain) are reported.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ets (engine)

Mask effects gain groups, stars, partial presets (only some sliders, with or
without Amount), optional brush settings and the settings an imported preset
carries that we can't apply (kept for export). New commands: mask.updateEffect,
renameEffect, duplicateEffect, favoriteEffect, setEffectGroup,
renameEffectGroup, toolEffect; applyEffect takes several masks, all masks, or
the same-named masks on the selected photos in one undo step. A new mask starts
with the effect last applied to a mask of its kind (kept with the library).

Import (mask.importEffects and preset.import): Lightroom Classic local
.lrtemplate, Camera Raw local-correction .xmp, .lceffect and zips of these;
folders and LrC divider presets ("10 ----- DETAIL ----- 10") become groups;
grain / Point Color / toningLuminance reported and kept. Malformed files are
errors, never panics.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The Effect menu above the mask sliders is grouped (★ Favorites first, then
groups in menu order), searchable, scrolls, works with ↑ ↓ Return, marks the
matching effect (else Custom) and previews an effect on the photo while the
pointer rests on it. Right-click: apply to all masks or to the same-named mask
on the selected photos, update, rename, duplicate, star, move to group, delete
(asks first). Reset Sliders; Update "<last effect>" with Current Settings.

New Effect Preset dialog: name, group, which sliders (All / None / Changed
Only), Amount, brush size/feather/flow. Manage Effect Presets window: search,
inline rename, update with mask, duplicate, stars, groups, export, delete with
confirmation. Names padded with runs of spaces (as LrC users do) are shown
collapsed. Import toasts name the groups and the settings kept but not applied.
New messages translated in every catalog. Docs: parity row and xmp-interop.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
OneSlips and others added 2 commits October 13, 2026 16:54
Conflicts: the 9 locale *-formats.json catalogs (both sides appended
messages at the end; kept both) and docs/parity-checklist.md (header
change list, regenerated summary via `cargo xtask parity --write`,
revision history rows from both sides).

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

Copy link
Copy Markdown
Contributor Author

Merged the current main (af4c5e1) into this branch to resolve the conflict in docs/parity-checklist.md; cargo xtask ci passes on Windows.

🤖 Generated with Claude Code

@echelon

echelon commented Oct 15, 2026

Copy link
Copy Markdown
Member

Thank you @OneSlips! This landed on main in integration batch 36 (#1843).

If you haven't already, please join our Discord: https://discord.gg/artcraft. We'd love to have you there.

endthestart pushed a commit to endthestart/lightcraft that referenced this pull request Oct 15, 2026
# Conflicts:
#	docs/parity-checklist.md
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