@@ -3521,7 +3521,8 @@ void QtMgx3DMainWindow::showReady ( )
35213521 CHECK_NULL_PTR_ERROR (_pythonPanel)
35223522 _pythonPanel->setInterpreterName (" Magix3D interpreter" );
35233523 // On facilite la tache de l'utilisateur : récupération du contexte de cette session :
3524- char *env = getenv (" MGX3D_PATH" );
3524+ char * env = getenv (" MGX3D_PATH" );
3525+ char * limaEnv = getenv (" LIMA_PATH" );
35253526 if (0 != env)
35263527 {
35273528 _pythonPanel->executeCommand (" import sys" );
@@ -3532,6 +3533,20 @@ void QtMgx3DMainWindow::showReady ( )
35323533 UTF8String importLine (Charset::UTF_8);
35333534 importLine << " import pyMagix3D as " << getMgx3DAlias ();
35343535 _pythonPanel->executeCommand (importLine);
3536+
3537+ if (0 != limaEnv)
3538+ {
3539+ const string comment = PythonLogOutputStream::toComment (UTF8String (" Pour une utilisation directe et scriptée de l'API Lima :" , Charset::UTF_8));
3540+ _pythonPanel->executeCommand (comment);
3541+ const string limaPath (limaEnv);
3542+ UTF8String limaPathCmd (Charset::UTF_8);
3543+ limaPathCmd << " sys.path.append(\" " << limaPath << " \" )" ;
3544+ _pythonPanel->executeCommand (limaPathCmd);
3545+ UTF8String limaImportLine (Charset::UTF_8);
3546+ limaImportLine << " from LimaScripting import *" ;
3547+ _pythonPanel->executeCommand (limaImportLine);
3548+ } // if (0 != limaEnv)
3549+
35353550 UTF8String contextLine (Charset::UTF_8);
35363551 contextLine << getContextAlias () << " = " << getMgx3DAlias ()
35373552 << " .getContext(\" " << getContext ().getName () << " \" )" ;
0 commit comments