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 Seven 2026-07-02 22:46:19 +03:00
commit b2b2bfb246
31 changed files with 147 additions and 139 deletions

View file

@ -116,7 +116,7 @@ fn grips(vp: &Viewport) -> Vec<GripDef> {
]
}
fn properties(vp: &Viewport) -> PropSection {
fn properties(vp: &Viewport) -> Vec<PropSection> {
let scale_opts: Vec<String> = STANDARD_SCALES.iter().map(|(s, _)| s.to_string()).collect();
let effective_scale =
crate::scene::vp_effective_scale(vp.custom_scale, vp.view_height, vp.height);
@ -131,7 +131,7 @@ fn properties(vp: &Viewport) -> PropSection {
let shade_opts: Vec<String> = SHADE_PLOT_LABELS.iter().map(|s| s.to_string()).collect();
let current_shade = shade_plot_label(vp.shade_plot_mode).to_string();
PropSection {
vec![PropSection {
title: "Geometry".into(),
props: vec![
edit("Center X", "center_x", vp.center.x),
@ -311,7 +311,7 @@ fn properties(vp: &Viewport) -> PropSection {
format!("{:#010x}", vp.ambient_color as u32),
),
],
}
}]
}
/// Identify which standard view matches the viewport's view direction.