Skip to content

fix(optics): keep camera settings off film scanner frames - #1610

Merged
marcinz606 merged 3 commits into
marcinz606:mainfrom
kurtwindisch:fix/film-scanner-optics
Nov 5, 2026
Merged

marcinz606 merged 3 commits into
marcinz606:mainfrom
kurtwindisch:fix/film-scanner-optics

Conversation

@kurtwindisch

@kurtwindisch kurtwindisch commented Nov 5, 2026 •

Copy link
Copy Markdown
Contributor

Summary

A user reported: "flatfield correction for camera scanning is getting applied if you select film scanner; clicking the bulb changes the picture and hides the menu".

Every new frame took the last chosen flat field profile and the carried distortion, from any source. A film scanner roll therefore picked up the camera rig's corrections. The Optics card showed only while a correction was on, so some frames showed the card and others did not, and the bulb hid the card it sits on.

  • New film scanner frames take no carried camera settings. Those are Optics and Recovery (_CAMERA_ONLY_FIELDS). _apply_sticky_settings takes the frame's path and skips them, the last chosen profile included. A frame counts as a film scanner frame when Scanning Setup says Film Scanner, or the file is not a camera RAW.
  • Scanner frames leave the carried values alone. Saving one keeps the carried values, and picking a profile on one keeps the profile that camera frames take. Deleting that profile and Shoot Flat Field still set it from any frame.
  • The cards stay in reach. Optics and Raw Decode stay in view after their setting turns off, until another frame opens. Optics also stays while the frame is locked against its roll on that card.
  • Values a roll holds still apply to its scanner frames, because a push to the roll is a deliberate choice.
  • Guide, rolls.py comment and the four guide panels updated. No UI strings changed.

Open questions

  • Setup on Camera with a TIFF. The file type wins, so the frame takes no carried camera settings, but the cards show. The Scan tab never updates Setup, so a film scan under Camera would otherwise take the rig's corrections. A camera-sourced TIFF needs Flat Field turned on by hand.
  • Frames already saved with flat field on keep it. To clear a roll: click the bulb on one frame, then press the card's Roll button if it appears. Picking Film Scanner does not clear saved frames, because that switch would remove real corrections from open camera frames.
  • Turning Optics on for a film scanner frame means switching Setup to Camera, which is an app-wide change.
  • A camera RAW opened with Film Scanner set hides Optics and Raw Decode. The Camera or Film Scanner pick is one app-wide setting, not a frame setting. A camera RAW with default Optics opens with both cards hidden, so a move from a film scanner file to a camera file needs a change on the Setup card. This is the same before and after this PR, and Auto follows the file. The card has no way back to Auto after a pick. Possible changes: add Auto to the Setup card as a third choice, or always treat a camera RAW as a camera. The second choice has a risk for scanner software that writes DNG files. This PR makes neither change.

Test plan

  • uv run pytest tests --ignore=tests/test_key_hold.py (10554 passed), make lint, make type, make translations-check pass
  • tests/test_key_hold.py passes alone. make test segfaults there under --cov, on clean main as well, in a HUD timer lambda
  • New tests in test_desktop_session.py, test_scan_setup.py and test_controller.py
  • Drove the running app (offscreen) on generated TIFFs: new frames stay clean with both cards hidden, a reopened frame stays clean, the bulb changes the picture and keeps the card, the card hides on the next frame, and a TIFF leaves the camera's profile alone
  • Checked camera RAW files by hand in the app
  • Checked film scans by hand in the app, for each case above

This PR does not touch Rust.

🤖 Generated with Claude Code

kurtwindisch and others added 3 commits November 4, 2026 16:50
A new frame took the last chosen flat field profile and the carried
distortion from any source, so a camera rig's corrections applied to a
film scanner roll. The Optics card showed only while a correction was
on, so clicking the bulb changed the picture and hid the card.

A new frame now drops the carried Optics when Scanning Setup says Film
Scanner or the file is not a camera RAW. Values that the frame's roll
holds still apply. A film scanner frame leaves the carried values alone
when it saves, so the next camera frame keeps them.

The card stays in view after a correction turns off, until another
frame opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Recovery has no effect on a file that is not a camera RAW, but a carried
value kept the Raw Decode card in view on a film scanner frame, where a
Slide TIFF could not change it.

A new film scanner frame now drops the carried Recovery, and saving that
frame leaves the carried value for the next camera slide. The card stays
in view after Recovery turns off, until another frame opens.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Review of the first two commits found gaps:

- A saved film scanner frame took the last chosen profile on reopen,
  and a legacy profile's distortion with it.
- A profile picked or cleared on a film scanner frame replaced the
  profile that new camera frames take.
- A frame locked against its roll on Optics lost the card, so it could
  not rejoin the roll.
- Every persisted edit parsed the stored sticky config.

_apply_sticky_settings now takes the frame's path and skips the camera
settings there, which replaces the strip after the carry. The fields
sit in one constant, _CAMERA_ONLY_FIELDS. The file check runs only when
a camera setting would carry.

Deleting the last chosen profile and Shoot Flat Field still set it from
any frame.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@marcinz606
marcinz606 merged commit e8f020b into marcinz606:main Nov 5, 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.

2 participants