From a83871e5098933fc4b64b77c946ad22daa02371e Mon Sep 17 00:00:00 2001 From: Russell Johnson <47639332+Russ4262@users.noreply.github.com> Date: Sat, 4 Sep 2021 08:14:15 -0500 Subject: [PATCH] Path: Add `Base.Active` check early in `execute()` method This commit adds a `Base.Active` check to determine if the Base is Active. If the Base is Inactive, the new code sets the `obj.Path` property to the same inactive message used in PathOp module and the `execution()` method returns immediately, stopping further execution. --- src/Mod/Path/PathScripts/PathDressupRampEntry.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Mod/Path/PathScripts/PathDressupRampEntry.py b/src/Mod/Path/PathScripts/PathDressupRampEntry.py index 9fa7d0c040..f7283ac217 100644 --- a/src/Mod/Path/PathScripts/PathDressupRampEntry.py +++ b/src/Mod/Path/PathScripts/PathDressupRampEntry.py @@ -109,12 +109,18 @@ class ObjectDressup: return if not obj.Base.Path: return + + if not obj.Base.Active: + path = Path.Path("(inactive operation)") + obj.Path = path + return + if obj.Angle >= 90: obj.Angle = 89.9 elif obj.Angle <= 0: obj.Angle = 0.1 - if hasattr(obj, 'UseStartDepth'): + if hasattr(obj, "UseStartDepth"): self.ignoreAboveEnabled = obj.UseStartDepth self.ignoreAbove = obj.DressupStartDepth else: