diff --git a/src/Mod/Path/PathScripts/PathDrilling.py b/src/Mod/Path/PathScripts/PathDrilling.py index 10bc9c0c1..9c12eba5c 100644 --- a/src/Mod/Path/PathScripts/PathDrilling.py +++ b/src/Mod/Path/PathScripts/PathDrilling.py @@ -22,10 +22,14 @@ #* * #*************************************************************************** -import FreeCAD,FreeCADGui,Path,PathGui +import FreeCAD,Path from PySide import QtCore,QtGui from PathScripts import PathUtils,PathSelection,PathProject +FreeCADGui = None +if FreeCAD.GuiUp: + import FreeCADGui + """Path Drilling object and FreeCAD command""" # Qt tanslation handling diff --git a/src/Mod/Path/PathScripts/PathMachine.py b/src/Mod/Path/PathScripts/PathMachine.py index dd39c93d3..15d1adc59 100644 --- a/src/Mod/Path/PathScripts/PathMachine.py +++ b/src/Mod/Path/PathScripts/PathMachine.py @@ -23,11 +23,11 @@ #*************************************************************************** ''' A CNC machine object to define how code is posted ''' -import FreeCAD,FreeCADGui,Path,PathGui +import FreeCAD,Path import PathScripts from PathScripts import PathProject, PathUtils from PySide import QtCore,QtGui -import os, sys +import os, sys # Qt tanslation handling try: @@ -228,6 +228,7 @@ class CommandPathMachine: if FreeCAD.GuiUp: # register the FreeCAD command + import FreeCADGui FreeCADGui.addCommand('Path_Machine',CommandPathMachine()) diff --git a/src/Mod/Path/PathScripts/PathPocket.py b/src/Mod/Path/PathScripts/PathPocket.py index 7b6522386..78029c75c 100644 --- a/src/Mod/Path/PathScripts/PathPocket.py +++ b/src/Mod/Path/PathScripts/PathPocket.py @@ -22,10 +22,14 @@ #* * #*************************************************************************** -import FreeCAD,FreeCADGui,Path,PathGui +import FreeCAD,Path from PySide import QtCore,QtGui from PathScripts import PathUtils +FreeCADGui = None +if FreeCAD.GuiUp: + import FreeCADGui + """Path Pocket object and FreeCAD command""" # Qt tanslation handling diff --git a/src/Mod/Path/PathScripts/PathProject.py b/src/Mod/Path/PathScripts/PathProject.py index 5b228a20b..a542253d2 100644 --- a/src/Mod/Path/PathScripts/PathProject.py +++ b/src/Mod/Path/PathScripts/PathProject.py @@ -22,9 +22,13 @@ #* * #*************************************************************************** -import FreeCAD,FreeCADGui,Path,PathGui +import FreeCAD,Path from PySide import QtCore,QtGui +FreeCADGui = None +if FreeCAD.GuiUp: + import FreeCADGui + """Path Project object and FreeCAD command""" # Qt tanslation handling