fix minor bugs with sanity report and job visibility (#14043)

This commit is contained in:
sliptonic
2024-05-16 07:27:45 -05:00
committed by GitHub
parent b72a8c4222
commit a0e4184c73
2 changed files with 6 additions and 7 deletions

View File

@@ -126,7 +126,7 @@ class ViewProvider:
self.sep = coin.SoSeparator()
self.axs = coin.SoType.fromName("SoAxisCrossKit").createInstance()
#Adjust the axis heads if needed, the scale here is just for the head
# Adjust the axis heads if needed, the scale here is just for the head
self.axs.set("xHead.transform", "scaleFactor 1.5 1.5 1")
self.axs.set("yHead.transform", "scaleFactor 1.5 1.5 1")
self.axs.set("zHead.transform", "scaleFactor 1.5 1.5 1")
@@ -171,7 +171,6 @@ class ViewProvider:
for base in self.obj.Model.Group:
Path.Log.debug(f"{base.Name}: {base.ViewObject.Visibility}")
def onChanged(self, vobj, prop):
if prop == "Visibility":
self.showOriginAxis(vobj.Visibility)
@@ -202,10 +201,10 @@ class ViewProvider:
def RestoreBaseVisibility(self):
Path.Log.debug("RestoreBaseVisibility")
for base in self.obj.Model.Group:
base.ViewObject.Visibility = self.visibilitystate[base.Name]
Path.Log.debug(self.visibilitystate)
if hasattr(self, "visibilitystate"):
for base in self.obj.Model.Group:
base.ViewObject.Visibility = self.visibilitystate[base.Name]
Path.Log.debug(self.visibilitystate)
def showOriginAxis(self, yes):
sw = coin.SO_SWITCH_ALL if yes else coin.SO_SWITCH_NONE

View File

@@ -402,7 +402,7 @@ class CAMSanity:
)
)
tooldata["image"] = ""
imagepath = "" #os.path.join(self.filelocation, f"T{TC.ToolNumber}.png")
imagepath = os.path.join(self.filelocation, f"T{TC.ToolNumber}.png")
tooldata["imagepath"] = imagepath
Path.Log.debug(imagepath)
if imagedata is not None: