From 1a3996783e4737cb94a67212fbcbe3367b35b614 Mon Sep 17 00:00:00 2001 From: pekkaroi Date: Sun, 27 May 2018 18:58:56 +0300 Subject: [PATCH] Improve backwards compatibility --- .../Path/PathScripts/PathDressupRampEntry.py | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathDressupRampEntry.py b/src/Mod/Path/PathScripts/PathDressupRampEntry.py index 71ce840fd6..4f057dff5d 100644 --- a/src/Mod/Path/PathScripts/PathDressupRampEntry.py +++ b/src/Mod/Path/PathScripts/PathDressupRampEntry.py @@ -69,10 +69,11 @@ class ObjectDressup: self.setEditorProperties(obj) def setEditorProperties(self, obj): - if obj.UseStartDepth: - obj.setEditorMode('DressupStartDepth', 0) - else: - obj.setEditorMode('DressupStartDepth', 2) + if hasattr(obj, 'UseStartDepth'): + if obj.UseStartDepth: + obj.setEditorMode('DressupStartDepth', 0) + else: + obj.setEditorMode('DressupStartDepth', 2) if obj.RampFeedRate == 'Custom': obj.setEditorMode('CustomFeedRate', 0) @@ -97,8 +98,12 @@ class ObjectDressup: elif obj.Angle <= 0: obj.Angle = 0.1 - self.ignoreAboveEnabled = obj.UseStartDepth - self.ignoreAbove = obj.DressupStartDepth + if hasattr(obj, 'UseStartDepth'): + self.ignoreAboveEnabled = obj.UseStartDepth + self.ignoreAbove = obj.DressupStartDepth + else: + self.ignoreAboveEnabled = False + self.ignoreAbove = 0 self.angle = obj.Angle self.method = obj.Method