Disabled simulations stuff for the master branch
This commit is contained in:
parent
09ab819fc3
commit
293b9263ad
|
@ -51,6 +51,7 @@ class ShipWorkbench ( Workbench ):
|
||||||
# Simulation stuff only if pyOpenCL & numpy are present
|
# Simulation stuff only if pyOpenCL & numpy are present
|
||||||
hasOpenCL = True
|
hasOpenCL = True
|
||||||
hasNumpy = True
|
hasNumpy = True
|
||||||
|
hasSim = False # In development, activate it only for development purposes
|
||||||
try:
|
try:
|
||||||
import pyopencl
|
import pyopencl
|
||||||
except ImportError:
|
except ImportError:
|
||||||
|
@ -65,7 +66,7 @@ class ShipWorkbench ( Workbench ):
|
||||||
msg = QtGui.QApplication.translate("ship_console", "numpy not installed, simulations stuff will disabled therefore",
|
msg = QtGui.QApplication.translate("ship_console", "numpy not installed, simulations stuff will disabled therefore",
|
||||||
None,QtGui.QApplication.UnicodeUTF8)
|
None,QtGui.QApplication.UnicodeUTF8)
|
||||||
FreeCAD.Console.PrintMessage(msg + '\n')
|
FreeCAD.Console.PrintMessage(msg + '\n')
|
||||||
if hasOpenCL and hasNumpy:
|
if hasOpenCL and hasNumpy and hasSim:
|
||||||
simlist = ["Ship_CreateSim", "Ship_RunSim", "Ship_StopSim", "Ship_TrackSim"]
|
simlist = ["Ship_CreateSim", "Ship_RunSim", "Ship_StopSim", "Ship_TrackSim"]
|
||||||
self.appendToolbar(str(QtCore.QT_TRANSLATE_NOOP("Ship", "Simulation")),simlist)
|
self.appendToolbar(str(QtCore.QT_TRANSLATE_NOOP("Ship", "Simulation")),simlist)
|
||||||
self.appendMenu(str(QtCore.QT_TRANSLATE_NOOP("Ship", "Simulation")),simlist)
|
self.appendMenu(str(QtCore.QT_TRANSLATE_NOOP("Ship", "Simulation")),simlist)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user