Salome HOME
Merge branch 'master' into V9_dev
[modules/yacs.git] / src / py2yacs / py2yacs.cxx
index fcd711ced91368389fe01e56048086aba85c681b..253a7be5409ddb28fc05fe2c7900b0545fd65a45 100644 (file)
@@ -23,6 +23,7 @@
 #include "Proc.hxx"
 #include "InlineNode.hxx"
 #include "AutoGIL.hxx"
+#include "InputPort.hxx"
 
 Py2yacsException::Py2yacsException(const std::string& what)
 : std::exception(),
@@ -367,12 +368,17 @@ YACS::ENGINE::Proc* Py2yacs::createProc(const std::string& python_function)const
   for(it = fn_prop->_input_ports.begin();
       it != fn_prop->_input_ports.end();
       it++)
-    node->edAddInputPort(*it, tc_double);
+  {
+    YACS::ENGINE::InputPort *newport = node->edAddInputPort(*it, tc_double);
+    newport->edInit(0.0);
+  }
   
   for(it = fn_prop->_output_ports.begin();
       it != fn_prop->_output_ports.end();
       it++)
     node->edAddOutputPort(*it, tc_double);
-  
+
+  node->setExecutionMode(YACS::ENGINE::InlineNode::REMOTE_STR);
+  node->setContainer(schema->containerMap["DefaultContainer"]);
   return schema;
 }
\ No newline at end of file