Skip to content

feat(flat): Flat Scan stays on while you edit - #1695

Open
thetalkingdrum wants to merge 3 commits into
marcinz606:mainfrom
thetalkingdrum:claude/negpy-flat-mode-ux-55a5cf
Open

thetalkingdrum wants to merge 3 commits into
marcinz606:mainfrom
thetalkingdrum:claude/negpy-flat-mode-ux-55a5cf

Conversation

@thetalkingdrum

Copy link
Copy Markdown
Contributor

The problem

Flat Scan (M) shows the flat master, the low-contrast file that Output Intent Flat exports. Since #1318, an edit or a frame switch ends it. Before #1318 the view went stale instead: after an edit the canvas painted the print, and the FLAT SCAN badge stayed lit. Ending the view fixed that, but you still cannot work on a flat master. Each white balance or crop change drops you back to the print, and you press M again. #1318 left the better fix for later: keep the view on, render the edit, and gray out the controls it cannot show.

What this changes

  • Flat Scan stays on through edits, rotations and flips, undo and redo, and frame switches. It renders the flat master of the current edit each time, so it is never stale.
  • Controls that cannot change the flat master gray out, under one hint per tab. A new reaches_flat_master lookup decides which ones, and a test checks each field against the render.
  • Print-only tools are refused with a status message: the test strips, Pick Better, the retouch tools and the zone and clipping overlays.
  • A view that takes the canvas ends Flat Scan: Before / After, Export Size, Roll Average, the other peeks, Linear intent, a frame with a print recipe, and closing the last file.
  • It is a view only. The saved edit and Output Intent do not change. With Output Intent on Print, the Export panel shows a hint that the export is not the flat master.

Notes

  • Flat renders are never filed in the render memo or written as thumbnails, so a print view never shows flat pixels.
  • The saved bounds stay bit-identical when you turn Flat Scan on and off. I checked this in the app for C-41 with the GPU on, and in an engine test for an E-6 slide with Cast Removal on.
  • Flat Scan renders on the CPU and is still faster than the print. With HQ preview on a DNG, a drag takes 37 ms against 50 ms, and the release 371 ms against 782 ms.
  • No pixel changes for unchanged settings, so THUMBNAIL_RENDER_VERSION and BOUNDS_VERSION stay as they are.

Open questions

  • Flat Scan lasts only for the session, like the other peeks. Should it be remembered?
  • Is one hint per tab enough, or should each grayed card say why?

Add reaches_flat_master(section, *fields) beside flat_master_config. It is
the one source the Flat Scan view will gray its controls from. A later
change that makes the flat render read a new field adds it here only.

tests/test_flat_master_fields.py changes every Exposure field and every
card-owned Process field, renders the flat master in C-41, B&W and E-6,
and checks that the pixels move exactly when reaches_flat_master says so.
A B&W slide's flat master stays color today (_process_flat collapses only
a B&W negative); the test holds that as a strict xfail.
Flat Scan is now a view of the open frame that follows the edit. With it
on, a plain render renders the flat master of the current edit, so an
edit, undo or redo, a rotate or flip, a committed fine rotation, crop or
Keystone, and a frame switch keep the view on. toggle_flat_peek and
rerender_active_view make a plain render; request_render substitutes the
flat config.

The memo key, the thumbnail and metrics readback test the substituted
override, so flat pixels are never filed as the print. A frame switch
skips the render memo while Flat Scan is on, because the memo holds the
frame's print. A drag renders the proxy and the release the full preview.

The views that take the canvas still end it: compare, the Average peek,
the Export Size view, the negative and embedded peeks, zone placement, a
Linear or print launch recipe, and closing the last file.

The Peek Flat Scan and Preview Flat tooltips no longer say the view shows
only for a moment.
Every gate asks reaches_flat_master, so a field that later reaches the
flat render enables its control with no other change. Controls gray out
and never hide.

- The bodies of Tone, Dodge & Burn, Lab, Alternative Processes, Toning,
  Retouch and Finishing gray out. Each tab with a grayed control shows
  one hint.
- Filtration keeps Global color and Pick WB live and grays the Shadows
  and Highlights sliders and the ring-around. A Shadows or Highlights
  Pick WB ends, because the flat master ignores those fields.
- Paper Response keeps the Print stock live on a color negative. Pick
  Better and the Auto mirror gray out.
- The Roll tab grays Cast Average on the Baseline card.
- Export warns when the canvas is flat and Output Intent is not Flat.
- Flat Scan ends Pick Better and print-only tools and refuses them while
  it is on. The Clipping and Zone overlays and Zone Highlight gray out.

The guide says that Flat Scan stays on while you edit and that the
print-only controls gray out.
@thetalkingdrum

thetalkingdrum commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

@marcinz606 I added this now as it was ready, but feel free to review it after your trip if you think it's too much in the new features category. It does make working with flat quite a bit more friendly.

This branch has not been deployed

No deployments
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.

1 participant