Appearance dialog (MODIFY > Appearance, A)

Library swatches by category (the engine's library when it offers one, else built-in looks:
metals, plastics, paints, woods, glass with opacity), the looks in this design, a colour picker
and opacity, and the objects to apply to (bodies/components or faces). A swatch dragged onto a
body or face in the viewport, or onto a body's row in the Browser, applies at once; Apply and
OK give the picked objects the current look; pre-selected bodies become the objects.

Browser: rows under a drag of another kind count as hovered, and the Browser's own drops no
longer swallow other payloads (egui's take_payload takes any type), so swatches dropped on its
rows land.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AS5Tn3xieewUSg3uxrMVdL
This commit is contained in:
bherbruckandClaude Opus 5.5 committed 2026-10-08 10:22:53 +00:00
1 parent 187e9a97b9
commit d0a9ef27ca
6 files changed
+429 -2

No files matched your search

+8
View File
@@ -902,6 +902,14 @@ pub fn paint(p: &Painter, r: Rect, name: &str, ink: Color32, fill: Color32, acce
pen.arrow((19.0, 6.0), (13.0, 11.0), a);
pen.circle(19.0, 6.0, 3.0, pen.fill, a);
}
// Appearance: a shaded ball with three paint dabs.
"appearance" => {
pen.circle(10.0, 13.0, 7.5, pen.fill, ink);
pen.arc(10.0, 13.0, 4.5, 1.8, 3.2, Color32::WHITE);
pen.circle(18.0, 5.0, 2.6, Color32::from_rgb(220, 70, 60), ink);
pen.circle(20.5, 11.0, 2.6, Color32::from_rgb(70, 150, 230), ink);
pen.circle(19.0, 17.5, 2.6, Color32::from_rgb(240, 200, 60), ink);
}
"warning" => {
pen.poly(&[(12.0, 3.0), (21.0, 20.0), (3.0, 20.0)], Color32::from_rgb(250, 200, 60), ink);
pen.line(&[(12.0, 9.0), (12.0, 14.0)], ink);