From 7d53cc9e6f7eb84f8590455a8b3563969d71732d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lorenz=20H=C3=BCdepohl?= Date: Fri, 30 Dec 2016 22:33:15 +0100 Subject: [PATCH] Path: linuxcnc_post without GUI A simple fix to be able to easily use the linuxcnc_post module without the GUI present --- src/Mod/Path/PathScripts/linuxcnc_post.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Mod/Path/PathScripts/linuxcnc_post.py b/src/Mod/Path/PathScripts/linuxcnc_post.py index 4d625c5fe..ecb32bee4 100644 --- a/src/Mod/Path/PathScripts/linuxcnc_post.py +++ b/src/Mod/Path/PathScripts/linuxcnc_post.py @@ -40,7 +40,7 @@ Arguments for linuxcnc: --line-numbers,--no-line-numbers ... prefix with line numbers (--no-lin-numbers) --show-editor, --no-show-editor ... pop up editor before writing output(--show-editor) ''' - +import FreeCAD import datetime from PathScripts import PostUtils @@ -50,7 +50,10 @@ now = datetime.datetime.now() OUTPUT_COMMENTS = True OUTPUT_HEADER = True OUTPUT_LINE_NUMBERS = False -SHOW_EDITOR = True +if FreeCAD.GuiUp: + SHOW_EDITOR = True +else: + SHOW_EDITOR = False MODAL = False # if true commands are suppressed if the same as previous line. COMMAND_SPACE = " " LINENR = 100 # line number starting value