Materials: Render Transparency

Under certain conditions an objects transparency would no be updated.

fixes #14568
This commit is contained in:
David Carter
2024-06-11 11:11:45 -04:00
committed by Chris Hennes
parent 594c382e5e
commit 4e315183b3

View File

@@ -158,11 +158,12 @@ void ViewProviderGeometryObject::onChanged(const App::Property* prop)
}
else if (prop == &Transparency) {
long value = toPercent(ShapeAppearance.getTransparency());
float trans = fromPercent(Transparency.getValue());
if (value != Transparency.getValue()) {
float trans = fromPercent(Transparency.getValue());
pcShapeMaterial->transparency = trans;
ShapeAppearance.setTransparency(trans);
}
pcShapeMaterial->transparency = trans;
}
else if (prop == &ShapeAppearance) {
if (getObject() && getObject()->testStatus(App::ObjectStatus::TouchOnColorChange)) {