-// Copyright (C) 2014-2017 CEA/DEN, EDF R&D
+// Copyright (C) 2014-2019 CEA/DEN, EDF R&D
//
// This library is free software; you can redistribute it and/or
// modify it under the terms of the GNU Lesser General Public
//
// You should have received a copy of the GNU Lesser General Public
// License along with this library; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
//
-// See http://www.salome-platform.org/ or
-// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+// See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
//
#include <XGUI_CustomPrs.h>
double getTransparency(const ResultPtr& theResult)
{
- double aDeflection = -1;
+ double aTransparency = -1;
// get transparency from the attribute of the result
if (theResult.get() != NULL &&
theResult->data()->attribute(ModelAPI_Result::TRANSPARENCY_ID()).get() != NULL) {
AttributeDoublePtr aDoubleAttr = theResult->data()->real(ModelAPI_Result::TRANSPARENCY_ID());
if (aDoubleAttr.get() && aDoubleAttr->isInitialized()) {
- double aValue = aDoubleAttr->value();
- if (aValue > 0) /// zero value should not be used as a transparency(previous studies)
- aDeflection = aDoubleAttr->value();
+ aTransparency = aDoubleAttr->value();
}
}
- return aDeflection;
+ return aTransparency;
}
double getDefaultTransparency(const ResultPtr& theResult)
{
- return 0;
+ return Config_PropManager::integer("Visualization", "shaper_default_transparency") / 100.;
}
XGUI_CustomPrs::XGUI_CustomPrs(XGUI_Workshop* theWorkshop)