From 67555d2cc3abc63095e4dcab72551ca609220b65 Mon Sep 17 00:00:00 2001 From: Markus Lampert Date: Thu, 18 Mar 2021 18:00:55 -0700 Subject: [PATCH] Fixed coin import for py3 class initialisation --- src/Mod/Path/PathScripts/PathDressupDogbone.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/Mod/Path/PathScripts/PathDressupDogbone.py b/src/Mod/Path/PathScripts/PathDressupDogbone.py index 9407fcefbc..8ccb4f9023 100644 --- a/src/Mod/Path/PathScripts/PathDressupDogbone.py +++ b/src/Mod/Path/PathScripts/PathDressupDogbone.py @@ -887,7 +887,6 @@ class ObjectDressup(object): return state class Marker(object): - Color = [coin.SbColor(.9, .5, .9), coin.SbColor(.9, .9, .5)] def __init__(self, pt, r, h): if PathGeom.isRoughly(h, 0): @@ -920,13 +919,18 @@ class Marker(object): self.lowlight() def highlight(self): - self.material.diffuseColor = self.Color[1] + self.material.diffuseColor = self.color(1) self.material.transparency = 0.45 def lowlight(self): - self.material.diffuseColor = self.Color[0] + self.material.diffuseColor = self.color(0) self.material.transparency = 0.75 + def color(self, id): + if id == 1: + return coin.SbColor(.9, .9, .5) + return coin.SbColor(.9, .5, .9) + class TaskPanel(object): DataIds = QtCore.Qt.ItemDataRole.UserRole