refactor(properties): drop Shadow display from 3D Visualization
Leaves just Material in the group. The shadow_flags entity field is untouched (preserved on save); only the read-only panel row is removed. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
parent
ee4e6cc91c
commit
a4f7ee376f
1 changed files with 8 additions and 21 deletions
23
src/scene/cache/properties.rs
vendored
23
src/scene/cache/properties.rs
vendored
|
|
@ -93,9 +93,9 @@ pub fn general_section(entity: &EntityType) -> PropSection {
|
||||||
section
|
section
|
||||||
}
|
}
|
||||||
|
|
||||||
/// The "3D Visualization" group (Material + Shadow display), common to every
|
/// The "3D Visualization" group (Material), common to every graphical object.
|
||||||
/// graphical object. Material / plot-style / shadow source is flag-based; a
|
/// Material source is flag-based; a custom material handle is shown as "Custom"
|
||||||
/// custom material handle is shown as "Custom" (name resolution needs the doc).
|
/// (name resolution needs the doc).
|
||||||
pub fn visualization_section(entity: &EntityType) -> Option<PropSection> {
|
pub fn visualization_section(entity: &EntityType) -> Option<PropSection> {
|
||||||
if matches!(
|
if matches!(
|
||||||
entity,
|
entity,
|
||||||
|
|
@ -112,26 +112,13 @@ pub fn visualization_section(entity: &EntityType) -> Option<PropSection> {
|
||||||
1 => "ByBlock",
|
1 => "ByBlock",
|
||||||
_ => "Custom",
|
_ => "Custom",
|
||||||
};
|
};
|
||||||
let shadow = match common.shadow_flags {
|
|
||||||
0 => "Casts and Receives Shadows",
|
|
||||||
1 => "Casts Shadows",
|
|
||||||
2 => "Receives Shadows",
|
|
||||||
_ => "Ignores Shadows",
|
|
||||||
};
|
|
||||||
Some(PropSection {
|
Some(PropSection {
|
||||||
title: "3D Visualization".into(),
|
title: "3D Visualization".into(),
|
||||||
props: vec![
|
props: vec![Property {
|
||||||
Property {
|
|
||||||
label: "Material".into(),
|
label: "Material".into(),
|
||||||
field: "material",
|
field: "material",
|
||||||
value: PropValue::ReadOnly(material.into()),
|
value: PropValue::ReadOnly(material.into()),
|
||||||
},
|
}],
|
||||||
Property {
|
|
||||||
label: "Shadow display".into(),
|
|
||||||
field: "shadow_display",
|
|
||||||
value: PropValue::ReadOnly(shadow.into()),
|
|
||||||
},
|
|
||||||
],
|
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue