Path: Fix unable to import from CLI

Need to guard 'import FreeCADGui' in this case.
This commit is contained in:
Jon Nordby 2015-09-05 00:53:42 +02:00
parent 3c10cd1af2
commit b195afc8ca
4 changed files with 18 additions and 5 deletions

View File

@ -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

View File

@ -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())

View File

@ -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

View File

@ -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