Grade preset previews over the current edit and print the look's cast

Preset tiles were rendered from a reset grade, so correcting a frame and then
browsing looks showed thumbnails that no longer matched the canvas, and the
settle timer was keyed on object identity so the rail rarely caught up at all.
Tiles now render the whole grade a moment after it settles, keep their previous
images while the batch re-renders, and the Light panel shows the applied look's
cast and the final white balance under Temp and Tint.
This commit is contained in:
2026-12-02 05:27:12 +00:00
parent 4d7a123d49
commit 5b4b49200c
14 changed files with 397 additions and 31 deletions
+4 -12
View File
@@ -16,6 +16,7 @@ import type { Preview16 } from '../lib/preview16';
import { useMediaQuery } from '../lib/useMediaQuery';
import { usePersistentState } from '../lib/usePersistentState';
import { solveWhiteBalance } from '../lib/whiteBalance';
import { applyPresetEdits } from '../lib/presets';
import { buildAutoMask, type AutoMaskKind } from '../lib/autoMask';
import {
buildLensCorrection,
@@ -1647,18 +1648,9 @@ export default function Develop({
const applyPreset = useCallback(
(preset: Preset) => {
const next: Edits =
preset.id === 'original'
? { ...defaultEdits(), crop: photo.edits.crop }
: {
...photo.edits,
...preset.edits,
crop: photo.edits.crop,
// The camera profile belongs to the body that produced the raw.
cameraProfile: photo.edits.cameraProfile,
// A strong film response must not leak into the next look.
redscale: preset.edits.redscale ?? 0,
};
// The look grades over the photo's current white balance, so a correction
// made first is the base it is applied against.
const next = applyPresetEdits(photo.edits, preset);
onUpdate(photo.id, { edits: next }, `Preset: ${preset.name}`);
},
[onUpdate, photo.id, photo.edits],