refactor(scene): group modules into role-based subfolders

Move the 30 flat modules under src/scene/ into six folders by role:
convert (entity→geometry), text (fonts/shaping), model (render models),
pick (hit-test/selection/grips/xclip), view (camera/transform/render),
cache (block + property caches). pipeline/ is unchanged.

Full path migration — all `scene::X` references become
`scene::<group>::X`, no compatibility re-exports. render.rs items that
were `pub(super)` (parent was scene) become `pub(in crate::scene)` to
keep their original scene-wide visibility.

No behavior change; build and tests are green.

Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-06-16 11:33:46 +03:00
1 parent cd048165a9
commit 7fe7e0230d
160 files changed
+732 -715

No files matched your search

+1536
View File
File diff suppressed because it is too large. Load diff
+2
View File
@@ -0,0 +1,2 @@
pub mod block_cache;
pub mod properties;
+69
View File
@@ -0,0 +1,69 @@
use acadrust::{EntityType, Handle};
use crate::scene::model::object::{PropSection, PropValue, Property};
pub fn general_section(entity: &EntityType) -> PropSection {
let common = entity.common();
let linetype_display = if common.linetype.is_empty() {
"ByLayer".to_string()
} else {
common.linetype.clone()
};
let transp_pct = (common.transparency.alpha() as f64 / 255.0 * 100.0).round() as u32;
PropSection {
title: "General".into(),
props: vec![
Property {
label: "Layer".into(),
field: "layer",
value: PropValue::LayerChoice(common.layer.clone()),
},
Property {
label: "Color".into(),
field: "color",
value: PropValue::ColorChoice(common.color),
},
Property {
label: "Linetype".into(),
field: "linetype",
value: PropValue::LinetypeChoice(linetype_display),
},
Property {
label: "LT Scale".into(),
field: "linetype_scale",
value: PropValue::EditText(format!("{:.4}", common.linetype_scale)),
},
Property {
label: "Lineweight".into(),
field: "lineweight",
value: PropValue::LwChoice(common.line_weight),
},
Property {
label: "Transparency".into(),
field: "transparency",
value: PropValue::EditText(format!("{transp_pct}")),
},
Property {
label: "Invisible".into(),
field: "invisible",
value: PropValue::BoolToggle {
field: "invisible",
value: common.invisible,
},
},
],
}
}
pub fn fallback_properties(_handle: Handle, entity: &EntityType) -> PropSection {
PropSection {
title: "Geometry".into(),
props: vec![Property {
label: "Type".into(),
field: "type",
value: PropValue::ReadOnly(crate::entities::names::ui_name(entity).into()),
}],
}
}