#include <TDF_RelocationTable.hxx>
#include <TDF_ClosureTool.hxx>
+// TEST
+#include <Python.h>
+
using namespace std;
static Model_Session* myImpl = new Model_Session();
FeaturePtr Model_Session::createFeature(string theFeatureID)
{
- if (this != myImpl)
+ if (this != myImpl) {
return myImpl->createFeature(theFeatureID);
+ }
LoadPluginsInfo();
if (myPlugins.find(theFeatureID) != myPlugins.end()) {
myCurrentPluginName = aPlugin.first;
if (myPluginObjs.find(myCurrentPluginName) == myPluginObjs.end()) {
// load plugin library if not yet done
- Config_ModuleReader::loadLibrary(myCurrentPluginName);
+ //TODO: Get info from Config about python libraries
+ if (myCurrentPluginName.compare(string("PythonFeaturesPlugin")) == 0) {
+ Py_Initialize();
+ PyObject* module = PyImport_ImportModule(myCurrentPluginName.c_str());
+ assert(module != NULL);
+ } else {
+ Config_ModuleReader::loadLibrary(myCurrentPluginName);
+ }
}
if (myPluginObjs.find(myCurrentPluginName) != myPluginObjs.end()) {
FeaturePtr aCreated = myPluginObjs[myCurrentPluginName]->createFeature(theFeatureID);