Salome HOME
Merge branch 'occ/new_mg_licnese' of https://codev-tuleap.cea.fr/plugins/git/salome...
[modules/smesh.git] / src / Tools / YamsPlug / monYamsPlugDialog.py
index bfdc2811cd9c95d3078d4e8eb84d052928d55595..477a2b4e4fbd5345bc03a41040663b6e418115e0 100644 (file)
@@ -1,5 +1,5 @@
 # -*- coding: utf-8 -*-
-# Copyright (C) 2007-2020  EDF R&D
+# Copyright (C) 2007-2021  EDF R&D
 #
 # This library is free software; you can redistribute it and/or
 # modify it under the terms of the GNU Lesser General Public
@@ -69,7 +69,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     self.PB_MeshFile.setToolTip("source mesh from a file in disk")
 
     #Ces parametres ne sont pas remis a rien par le clean
-    self.paramsFile= os.path.abspath(os.path.join(os.environ["HOME"],".MGSurfOpt.dat"))
+    self.paramsFile= os.path.abspath(os.path.join(os.path.expanduser("~"),".MGSurfOpt.dat"))
     self.LE_ParamsFile.setText(self.paramsFile)
     self.LE_MeshFile.setText("")
     self.LE_MeshSmesh.setText("")
@@ -336,7 +336,7 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
     for slig in reversed(text.split(separator)):
       lig=slig.strip()
       #print "load ResumeData",lig
-      if lig=="": continue #skip blanck lines
+      if lig=="": continue #skip blank lines
       if lig[0]=="#": break
       try:
         tit,value=lig.split("=")
@@ -545,6 +545,10 @@ class MonYamsPlugDialog(Ui_YamsPlugDialog,QWidget):
 
     self.commande+=' --in "'  + self.fichierIn +'"'
     self.commande+=' --out "' + self.fichierOut +'"'
+
+    import SMeshHelper
+    key = SMeshHelper.GetMGLicenseKey( self.fichierIn )
+    self.commande+=' --key ' + key
     
     print(self.commande)
     return True