Salome HOME
e7a28080540a8284c36a9fbb433693512607cb86
[modules/shaper.git] / src / PythonFeaturesPlugin / PythonFeaturesPlugin.py
1 from ModelAPI import *
2 import PythonFeaturesPlugin_Box
3
4 class PythonFeaturesPlugin(ModelAPI_Plugin):
5   def __init__(self):
6     ModelAPI_Plugin.__init__(self)
7     pass
8
9   def createFeature(self, theFeatureID):
10     if theFeatureID == PythonFeaturesPlugin_Box.ID():
11       return PythonFeaturesPlugin_Box()
12     else:
13       raise StandardError("No such feature %s"%theFeatureID)
14
15 plugin = PythonFeaturesPlugin()
16 ModelAPI_Session_get().registerPlugin(plugin)
17