From 7c3ca87e4adaa16ef0bfdfe2bc915088c0245aa5 Mon Sep 17 00:00:00 2001 From: sliptonic Date: Sat, 20 Apr 2024 09:15:06 -0500 Subject: [PATCH] findParentJob will now return the original object if it is a job rather than None --- src/Mod/CAM/PathScripts/PathUtils.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/Mod/CAM/PathScripts/PathUtils.py b/src/Mod/CAM/PathScripts/PathUtils.py index a584382027..9d02eacce5 100644 --- a/src/Mod/CAM/PathScripts/PathUtils.py +++ b/src/Mod/CAM/PathScripts/PathUtils.py @@ -401,6 +401,9 @@ def findToolController(obj, proxy, name=None): def findParentJob(obj): """retrieves a parent job object for an operation or other Path object""" Path.Log.track() + if hasattr(obj, "Proxy") and isinstance(obj.Proxy, PathJob.ObjectJob): + return obj + for i in obj.InList: if hasattr(i, "Proxy") and isinstance(i.Proxy, PathJob.ObjectJob): return i