Path: Fix unable to import from CLI
Need to guard 'import FreeCADGui' in this case.
This commit is contained in:
parent
3c10cd1af2
commit
b195afc8ca
|
@ -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
|
||||
|
|
|
@ -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())
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user