refactor(properties): entity property groups return Vec<PropSection>

Groundwork for making the Properties panel conform to the per-entity group/row
spec (PROPERTIES.md). The panel already renders a Vec of sections, but each
entity could only express a single geometry section.

Change PropertyEditable::geometry_properties (and the EntityTypeOps enum
dispatch) to return Vec<PropSection>, update the two impl macros, and flatten
in properties_sectioned so the panel shows [General] + the entity's groups.
Every entity builder is wrapped to return its existing section as a one-element
Vec — pure mechanical change, no rows or titles altered, panel output identical.

Enables Phase 2: rewriting each entity's groups/rows to match the spec.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-02 22:46:19 +03:00
1 parent 8164e14a19
commit b2b2bfb246
31 files changed
+147 -139

No files matched your search

+3 -3
View File
@@ -19,8 +19,8 @@ fn grips(ins: &Insert) -> Vec<GripDef> {
vec![square_grip(0, glam::DVec3::new(w.x, w.y, w.z))]
}
fn properties(ins: &Insert) -> PropSection {
PropSection {
fn properties(ins: &Insert) -> Vec<PropSection> {
vec![PropSection {
title: "Geometry".into(),
props: vec![
edit("Insert X", "ins_x", ins.insert_point.x),
@@ -32,7 +32,7 @@ fn properties(ins: &Insert) -> PropSection {
edit("Rotation", "rotation", ins.rotation.to_degrees()),
ro("Block", "block", ins.block_name.clone()),
],
}
}]
}
fn apply_geom_prop(ins: &mut Insert, field: &str, value: &str) {