diff --git a/src/App/PropertyStandard.cpp b/src/App/PropertyStandard.cpp index c46f62ee4b..07452a4de1 100644 --- a/src/App/PropertyStandard.cpp +++ b/src/App/PropertyStandard.cpp @@ -3033,22 +3033,22 @@ const Color& PropertyMaterialList::getEmissiveColor(int index) const return _lValueList[index].emissiveColor; } -double PropertyMaterialList::getShininess() const +float PropertyMaterialList::getShininess() const { return _lValueList[0].transparency; } -double PropertyMaterialList::getShininess(int index) const +float PropertyMaterialList::getShininess(int index) const { return _lValueList[index].transparency; } -double PropertyMaterialList::getTransparency() const +float PropertyMaterialList::getTransparency() const { return _lValueList[0].transparency; } -double PropertyMaterialList::getTransparency(int index) const +float PropertyMaterialList::getTransparency(int index) const { return _lValueList[index].transparency; } diff --git a/src/App/PropertyStandard.h b/src/App/PropertyStandard.h index a66e482f9c..ed617cc821 100644 --- a/src/App/PropertyStandard.h +++ b/src/App/PropertyStandard.h @@ -1166,11 +1166,11 @@ public: const Color& getEmissiveColor() const; const Color& getEmissiveColor(int index) const; - double getShininess() const; - double getShininess(int index) const; + float getShininess() const; + float getShininess(int index) const; - double getTransparency() const; - double getTransparency(int index) const; + float getTransparency() const; + float getTransparency(int index) const; PyObject* getPyObject() override; diff --git a/src/Gui/ViewProviderGeometryObject.cpp b/src/Gui/ViewProviderGeometryObject.cpp index 82d4295e47..34170b4f49 100644 --- a/src/Gui/ViewProviderGeometryObject.cpp +++ b/src/Gui/ViewProviderGeometryObject.cpp @@ -149,7 +149,7 @@ void ViewProviderGeometryObject::onChanged(const App::Property* prop) getObject()->touch(true); } const App::Material& Mat = ShapeAppearance[0]; - long value = (long)(100.0 * ShapeAppearance.getTransparency() + 0.5); + long value = (long)(100.0 * ShapeAppearance.getTransparency()); if (value != Transparency.getValue()) { Transparency.setValue(value); }