Materials: Physical property attributes

Add dynamic attributes to report the physical attributes of a part that
are automatically recalculaated when the shape or material changes.
These values are accessible from the part data display and as attributes
within Python
This commit is contained in:
David Carter
2024-10-24 00:10:46 -04:00
committed by Yorik van Havre
parent 223877873b
commit 6af113bc4f
7 changed files with 105 additions and 8 deletions

View File

@@ -1108,6 +1108,16 @@ bool Material::hasLegacyProperties() const
return !_legacy.empty();
}
bool Material::hasPhysicalProperties() const
{
return !_physicalUuids.isEmpty();
}
bool Material::hasAppearanceProperties() const
{
return !_appearanceUuids.isEmpty();
}
bool Material::isInherited(const QString& uuid) const
{
if (_physicalUuids.contains(uuid)) {