1 """Registration of all user-defined Python features
5 from macros.box.feature import BoxFeature
8 class PythonFeaturesPlugin(ModelAPI.ModelAPI_Plugin):
11 ModelAPI.ModelAPI_Plugin.__init__(self)
12 aSession = ModelAPI.ModelAPI_Session.get()
13 aSession.registerPlugin(self)
16 def createFeature(self, theFeatureID):
19 if theFeatureID == BoxFeature.ID():
20 aFeature = BoxFeature().__disown__()
23 raise StandardError("No such feature %s" % theFeatureID)
28 plugin = PythonFeaturesPlugin()