forked from 1b-agent/fieldcraft-upstream
ui: Relax Nodes takes picked faces (#471)
Use selection puts the selected design faces in the form as faces, in place of a sphere; Shift/Ctrl-click picks faces while the form is open, and every click does once the form lists faces. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01UhhZMBTviDQxZvwnyP89fo
This commit is contained in:
1 parent
3ee622f62a
commit
7d269c58f9
5 files changed
+77
-7
No files matched your search
@@ -47,8 +47,10 @@ pub fn show(app: &mut ModelApp, ui: &mut egui::Ui) {
|
||||
if response.clicked()
|
||||
&& let Some(at) = response.interact_pointer_pos()
|
||||
{
|
||||
// With Relax Nodes open a click on the mesh places its sphere (#398).
|
||||
let placed = app.relaxing() && app.surface_point(at).is_some_and(|p| app.relax_place(p));
|
||||
// With Relax Nodes open a plain click on the mesh places its sphere (#398); Shift or
|
||||
// Ctrl picks faces to relax (#471), and so does every click once the form lists faces.
|
||||
let plain = mode(ui.input(|i| i.modifiers)) == Mode::Replace;
|
||||
let placed = app.relaxing() && plain && !app.relax_by_faces() && app.surface_point(at).is_some_and(|p| app.relax_place(p));
|
||||
if !placed {
|
||||
let _ = app.select_at(at, mode(ui.input(|i| i.modifiers)));
|
||||
probe_at(app, at, rect);
|
||||
|
||||
Reference in new issue
Block a user