Salome HOME
Add construction plugin without tests.
[modules/shaper.git] / src / PythonAPI / model / roots.py
index b5d05f559f01dd02c1fe30e728d1834de9c38e63..a5ac3c2014234874c733336619b588704301eca1 100644 (file)
@@ -5,7 +5,7 @@ Copyright (C) 2014-20xx CEA/DEN, EDF R&D
 
 import ModelAPI
 
-from .tools import get_value, convert_to_underscore
+from model import tools
 
 
 class Feature(ModelAPI.ModelAPI_Feature):
@@ -46,7 +46,7 @@ class Interface():
         if name.startswith("get"):
             possible_names = [
                 "_" + name[3:],
-                "_" + convert_to_underscore(name[3:]),
+                "_" + tools.convert_to_underscore(name[3:]),
                 ]
             for possible_name in possible_names:
                 if hasattr(self, possible_name):
@@ -63,6 +63,10 @@ class Interface():
         """Return ModelAPI_Feature."""
         return self._feature
 
+    def _fill_attribute(self, attribute, value):
+        """Fill ModelAPI_Attribute* with value."""
+        tools.fill_attribute(attribute, value)
+
     def setRealInput(self, inputid, value):
         self._feature.data().real(inputid).setValue(value)