5 from PythonFeaturesPlugin_Box import PythonFeaturesPlugin_Box
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):
18 if theFeatureID == PythonFeaturesPlugin_Box.ID():
19 aCompositeFeature = PythonFeaturesPlugin_Box().__disown__()
20 aFeature = ModelAPI.compositeFeatureToFeature(aCompositeFeature)
22 raise StandardError("No such feature %s" % theFeatureID)
26 plugin = PythonFeaturesPlugin()