From 71f8007bab5ea3a2038d321b42afa0ad4efa8a04 Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Fri, 2 Jul 2021 22:35:14 -0500 Subject: [PATCH] Path: Fixes #0004647, relative shape file locations This solution restricts relative shape files to filename only within the toolbit file. --- src/Mod/Path/PathScripts/PathToolBit.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathToolBit.py b/src/Mod/Path/PathScripts/PathToolBit.py index 44da128a61..c87d4cd6a2 100644 --- a/src/Mod/Path/PathScripts/PathToolBit.py +++ b/src/Mod/Path/PathScripts/PathToolBit.py @@ -380,7 +380,10 @@ class ToolBit(object): if PathPreferences.toolsStoreAbsolutePaths(): attrs['shape'] = obj.BitShape else: - attrs['shape'] = findRelativePathShape(obj.BitShape) + # attrs['shape'] = findRelativePathShape(obj.BitShape) + # Extract the name of the shape file + __, filShp = os.path.split(obj.BitShape) # __ is an ignored placeholder acknowledged by LGTM + attrs['shape'] = str(filShp) params = {} for name in obj.BitPropertyNames: params[name] = PathUtil.getPropertyValueString(obj, name)