Draft: only try to import FreeCADGui, coin and QtGui if FreeCAD.GuiUp is true

This commit is contained in:
wmayer
2020-01-15 12:24:18 +01:00
parent d195c1a703
commit 099cc2c59e

View File

@@ -34,19 +34,21 @@ the graphical user interface (GUI).
import FreeCAD
import FreeCADGui
from .utils import _msg
from .utils import _wrn
# from .utils import _log
from .utils import _tr
from .utils import getParam
from pivy import coin
from PySide import QtGui
# from PySide import QtSvg # for load_texture
import os
import math
import six
if FreeCAD.GuiUp:
import FreeCADGui
from pivy import coin
from PySide import QtGui
# from PySide import QtSvg # for load_texture
def get_3d_view():
"""Return the current 3D view.