M13.3: face tracking methods, Face Track Points / Measurements, camera lens distortion, docs

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Brandon Thomas
2026-10-03 04:36:12 -04:00
co-authored by Claude Opus 5.5
parent 0bce3f2e49
commit d209fa001f
19 changed files with 939 additions and 74 deletions
+27 -1
View File
@@ -404,6 +404,27 @@ fn mask_mode(app: &mut EffectcraftApp, ui: &mut egui::Ui, ctx: &egui::Context, p
bx += 34.0;
}
y += 34.0;
// Face Tracking (Detailed Features): Extract & Copy Face Measurements.
let has_points = app
.session
.active_comp()
.and_then(|c| c.layer(layer))
.and_then(|l| l.effects())
.is_some_and(|fx| fx.groups().any(|g| g.match_id == effectcraft_engine::effects::face_track::POINTS_ID));
if method == MaskMethod::FaceDetailed || has_points {
let r = Rect::from_min_size(pos2(x0, y), vec2(w.min(260.0), 24.0));
if button(app, ui, r, "Extract & Copy Face Measurements", has_points && !running, "tracker.mask.extractFace") {
match crate::menus::invoke(app, ctx, "track.extractFaceMeasurements", json!({"layer": layer.0})) {
Ok(v) => {
if let Some(text) = v.get("clipboard").and_then(|t| t.as_str()) {
ctx.copy_text(text.to_string());
}
}
Err(e) => app.ui.status = e,
}
}
y += 32.0;
}
if let Some(pr) = app.session.mask_track_progress() {
let bar = Rect::from_min_size(pos2(x0, y), vec2(w, 6.0));
p.rect_filled(bar, 3.0, t.field_bg);
@@ -419,7 +440,12 @@ fn mask_mode(app: &mut EffectcraftApp, ui: &mut egui::Ui, ctx: &egui::Context, p
);
ctx.request_repaint_after(std::time::Duration::from_millis(50));
} else {
p.text(pos2(x0, y + 8.0), Align2::LEFT_CENTER, "Tracks the pixels inside the mask and keys its Mask Path.", Tokens::ui(11.0), t.text_faint);
let hint = if method.is_face() {
"Finds the face inside the mask and keys its outline (and, with Detailed Features, Face Track Points)."
} else {
"Tracks the pixels inside the mask and keys its Mask Path."
};
p.text(pos2(x0, y + 8.0), Align2::LEFT_CENTER, hint, Tokens::ui(11.0), t.text_faint);
}
}