2 # Python plugin for exporting entities into Salome's GEOM module
3 # Copyright (C) 2014-20xx CEA/DEN, EDF R&D
7 from ConnectorPlugin_ExportFeature import ExportFeature
10 # The main class for management the construction features as plugin.
11 class ConnectorPlugin(ModelAPI.ModelAPI_Plugin):
15 ModelAPI.ModelAPI_Plugin.__init__(self)
18 ## Creates the feature objects of this plugin by the feature string ID.
19 def createFeature(self, theFeatureID):
20 if theFeatureID == ExportFeature.ID():
21 return ExportFeature().__disown__()
23 print "ConnectorPlugin: No such feature %s" % theFeatureID
25 ## The plugin created on module importing (from c++)
26 plugin = ConnectorPlugin()
27 ## Main session of the application
28 aSession = ModelAPI.ModelAPI_Session.get()
29 aSession.registerPlugin(plugin)