Skip to content

LightCraft: An open-source non-destructive photo editor written by scratch in pure Rust

Merge PR #703

Claudedb8b82c6d770
diff --cc crates/engine/src/crs.rs
index b9a9b91e3,92fdf2c79..9799a35ec
--- a/crates/engine/src/crs.rs
+++ b/crates/engine/src/crs.rs
@@@ -466,10 -462,19 +466,18 @@@ pub fn to_partial_report(props: &Props
read.extend(crate::crs_masks::CONTAINERS.iter().map(|c| c.to_string()));
mask_skips.extend(skipped.into_iter().map(|k| format!("Mask: {k}")));
}
+ let (spots, skipped) = crate::crs_masks::spots(values, aspect);
+ if !spots.is_empty() {
+ put(&mut out, "spots", Value::Array(spots));
+ }
+ if values.keys().any(|k| crate::crs_masks::SPOT_CONTAINERS.contains(&k.as_str())) {
+ read.extend(crate::crs_masks::SPOT_CONTAINERS.iter().map(|c| c.to_string()));
+ mask_skips.extend(skipped.into_iter().map(|k| format!("Spot: {k}")));
+ }
}
- // fields that only switch a panel on/off or name things: not adjustments by themselves; an
- // HDR edit mode that is off, and Point Color slots that are all empty (-1)
+ // fields that only switch a panel on/off or name things: not adjustments by themselves; and
+ // Point Color slots that are all empty (-1)
let value_is = |k: &str, f: &dyn Fn(&[String]) -> bool| props.get(&format!("crs:{k}")).is_some_and(|v| f(v));
- let off = |v: &[String]| v.iter().all(|s| s.trim() == "0");
let empty_points = |v: &[String]| v.iter().all(|s| s.split(',').all(|n| n.trim().parse::<f64>().is_ok_and(|x| x == -1.0) || n.trim().is_empty()));
let quiet = |k: &str| {
k.starts_with("Enable")