feat(properties): resolve Hyperlink (XDATA) and custom Material name

Fill the two placeholder rows added earlier. Read the General group's
Hyperlink from the entity's XDATA (the "PE_URL" application record's first
string). When an entity carries an explicit material (material_flags == 3),
resolve its material_handle to the Material object's name and show it in the
3D Visualization group instead of "Custom".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Hakan SevenandClaude Opus 4.8 committed 2026-07-02 23:25:02 +03:00
1 parent 1f2d543755
commit 41f4a062dc
2 files changed
+46 -1

No files matched your search

+13 -1
View File
@@ -11,6 +11,18 @@ pub fn general_section(entity: &EntityType) -> PropSection {
};
let transp_pct = (common.transparency.alpha() as f64 / 255.0 * 100.0).round() as u32;
// Hyperlink is stored in XDATA under the "PE_URL" application.
let hyperlink = common
.extended_data
.get_record("PE_URL")
.and_then(|r| {
r.values.iter().find_map(|v| match v {
acadrust::xdata::XDataValue::String(s) if !s.is_empty() => Some(s.clone()),
_ => None,
})
})
.unwrap_or_default();
PropSection {
title: "General".into(),
props: vec![
@@ -64,7 +76,7 @@ pub fn general_section(entity: &EntityType) -> PropSection {
Property {
label: "Hyperlink".into(),
field: "hyperlink",
value: PropValue::ReadOnly(String::new()),
value: PropValue::ReadOnly(hyperlink),
},
Property {
label: "Invisible".into(),