Salome HOME
Draft of transparency
[modules/shaper.git] / src / ModelHighAPI / ModelHighAPI_Selection.cpp
index 60017e8cc972e35af3e319f019f6d01744058b4b..0eb6c78c27b23106dae089b83f34bd8220b8569c 100644 (file)
@@ -155,6 +155,17 @@ void ModelHighAPI_Selection::setDeflection(double theValue)
   aDeflectionAttr->setValue(theValue);
 }
 
+void ModelHighAPI_Selection::setTransparency(double theValue)
+{
+  if (myVariantType != VT_ResultSubShapePair)
+    return;
+
+  AttributeDoublePtr aTransparencyAttr =
+    myResultSubShapePair.first->data()->real(ModelAPI_Result::TRANSPARENCY_ID());
+
+  aTransparencyAttr->setValue(theValue);
+}
+
 int ModelHighAPI_Selection::numberOfSubs() const
 {
   if (myVariantType != VT_ResultSubShapePair)