From f5d2ce252ce1881e05427079af2eea95b0125a5f Mon Sep 17 00:00:00 2001 From: Daniel Wood Date: Mon, 16 Mar 2020 22:24:14 +0000 Subject: [PATCH] [Path] fix tool changes (Revert previous change) --- src/Mod/Path/PathScripts/post/linuxcnc_post.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/src/Mod/Path/PathScripts/post/linuxcnc_post.py b/src/Mod/Path/PathScripts/post/linuxcnc_post.py index ff93894d2f..5bc9e5cca6 100644 --- a/src/Mod/Path/PathScripts/post/linuxcnc_post.py +++ b/src/Mod/Path/PathScripts/post/linuxcnc_post.py @@ -29,7 +29,6 @@ import datetime import shlex from PathScripts import PostUtils from PathScripts import PathUtils -import PathScripts.PathUtil as PathUtil TOOLTIP = ''' This is a postprocessor file for the Path workbench. It is used to @@ -154,7 +153,6 @@ def processArguments(argstring): return True - def export(objectslist, filename, argstring): # pylint: disable=global-statement if not processArguments(argstring): @@ -187,8 +185,12 @@ def export(objectslist, filename, argstring): for obj in objectslist: # Skip inactive operations - if not PathUtil.opProperty(obj, 'Active'): - continue + if hasattr(obj, 'Active'): + if not obj.Active: + continue + if hasattr(obj, 'Base') and hasattr(obj.Base, 'Active'): + if not obj.Base.Active: + continue # fetch machine details job = PathUtils.findParentJob(obj)