X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FPythonAddons%2Faddons_Features.py;h=9499f21134c5aefef059bad27012e07f1a15ea45;hb=33c5fdce3cd63dd95a738439a0399dd982abcd73;hp=3ff9f26ddfa2648a0c765a5bf2c051759d88b5d4;hpb=ccba1627ced32120b894d5731f9e960635c87bc1;p=modules%2Fshaper.git diff --git a/src/PythonAddons/addons_Features.py b/src/PythonAddons/addons_Features.py index 3ff9f26dd..9499f2113 100644 --- a/src/PythonAddons/addons_Features.py +++ b/src/PythonAddons/addons_Features.py @@ -2,11 +2,12 @@ """ import ModelAPI -from macros.box.feature import BoxFeature +from macros.box.feature import BoxFeature +from macros.rectangle.feature import SketchPlugin_Rectangle class PythonFeaturesPlugin(ModelAPI.ModelAPI_Plugin): - """Class for Python features plugin. + """Implementation of features plugin. PythonFeaturesPlugin() -> plugin object """ @@ -25,11 +26,14 @@ class PythonFeaturesPlugin(ModelAPI.ModelAPI_Plugin): if theFeatureID == BoxFeature.ID(): aFeature = BoxFeature().__disown__() + elif theFeatureID == SketchPlugin_Rectangle.ID(): + aFeature = SketchPlugin_Rectangle().__disown__() + else: raise StandardError("No such feature %s" % theFeatureID) return aFeature - +# The plugin object plugin = PythonFeaturesPlugin() plugin.__disown__()