From a6cfb18e374d77533b1a2d62813da8f5116dbe6c Mon Sep 17 00:00:00 2001 From: Yorik van Havre Date: Tue, 7 Mar 2017 13:36:33 -0300 Subject: [PATCH] Arch: Renaming Hires to HiRes --- src/Mod/Arch/ArchComponent.py | 34 +++++++++++++++++----------------- src/Mod/Arch/importOBJ.py | 22 +++++++++++----------- 2 files changed, 28 insertions(+), 28 deletions(-) diff --git a/src/Mod/Arch/ArchComponent.py b/src/Mod/Arch/ArchComponent.py index 81b14af937f9..d0adea4a4727 100644 --- a/src/Mod/Arch/ArchComponent.py +++ b/src/Mod/Arch/ArchComponent.py @@ -323,7 +323,7 @@ def __init__(self,obj): obj.addProperty("App::PropertyArea","VerticalArea","Arch",QT_TRANSLATE_NOOP("App::Property","The area of all vertical faces of this object")) obj.addProperty("App::PropertyArea","HorizontalArea","Arch",QT_TRANSLATE_NOOP("App::Property","The area of the projection of this object onto the XY plane")) obj.addProperty("App::PropertyLength","PerimeterLength","Arch",QT_TRANSLATE_NOOP("App::Property","The perimeter length of the horizontal area")) - obj.addProperty("App::PropertyLink","Hires","Arch",QT_TRANSLATE_NOOP("App::Property","An optional higher-resolution mesh or shape for this object")) + obj.addProperty("App::PropertyLink","HiRes","Arch",QT_TRANSLATE_NOOP("App::Property","An optional higher-resolution mesh or shape for this object")) obj.Proxy = self self.Type = "Component" self.Subvolume = None @@ -726,12 +726,12 @@ def attach(self,vobj): self.hiresgroup = coin.SoSeparator() self.meshcolor = coin.SoBaseColor() self.hiresgroup.addChild(self.meshcolor) - self.hiresgroup.setName("Hires") - vobj.addDisplayMode(self.hiresgroup,"Hires"); + self.hiresgroup.setName("HiRes") + vobj.addDisplayMode(self.hiresgroup,"HiRes"); return def getDisplayModes(self,vobj): - modes=["Hires"] + modes=["HiRes"] return modes def setDisplayMode(self,mode): @@ -739,25 +739,25 @@ def setDisplayMode(self,mode): if self.meshnode: self.hiresgroup.removeChild(self.meshnode) del self.meshnode - if mode == "Hires": + if mode == "HiRes": from pivy import coin m = None if hasattr(self,"Object"): - if hasattr(self.Object,"Hires"): - if self.Object.Hires: + if hasattr(self.Object,"HiRes"): + if self.Object.HiRes: # if the file was recently loaded, the node is not present yet - self.Object.Hires.ViewObject.show() - self.Object.Hires.ViewObject.hide() - m = self.Object.Hires.ViewObject.RootNode + self.Object.HiRes.ViewObject.show() + self.Object.HiRes.ViewObject.hide() + m = self.Object.HiRes.ViewObject.RootNode if not m: if hasattr(self.Object,"CloneOf"): if self.Object.CloneOf: - if hasattr(self.Object.CloneOf,"Hires"): - if self.Object.CloneOf.Hires: + if hasattr(self.Object.CloneOf,"HiRes"): + if self.Object.CloneOf.HiRes: # if the file was recently loaded, the node is not present yet - self.Object.CloneOf.Hires.ViewObject.show() - self.Object.CloneOf.Hires.ViewObject.hide() - m = self.Object.CloneOf.Hires.ViewObject.RootNode + self.Object.CloneOf.HiRes.ViewObject.show() + self.Object.CloneOf.HiRes.ViewObject.hide() + m = self.Object.CloneOf.HiRes.ViewObject.RootNode if m: self.meshnode = m.copy() for c in self.meshnode.getChildren(): @@ -765,7 +765,7 @@ def setDisplayMode(self,mode): if isinstance(c,coin.SoSwitch): num = 0 if c.getNumChildren() > 0: - if c.getChild(0).getName() == "Hires": + if c.getChild(0).getName() == "HiRes": num = 1 print "getting node ",num," for ",self.Object.Label c.whichChild = num @@ -810,7 +810,7 @@ def claimChildren(self): if hasattr(self.Object,link): objlink = getattr(self.Object,link) c.extend(objlink) - for link in ["Tool","Subvolume","Mesh","Hires"]: + for link in ["Tool","Subvolume","Mesh","HiRes"]: if hasattr(self.Object,link): objlink = getattr(self.Object,link) if objlink: diff --git a/src/Mod/Arch/importOBJ.py b/src/Mod/Arch/importOBJ.py index 96b9dc8fdc46..004572e3d195 100644 --- a/src/Mod/Arch/importOBJ.py +++ b/src/Mod/Arch/importOBJ.py @@ -128,25 +128,25 @@ def export(exportList,filename): hires = None if FreeCAD.GuiUp: visible = obj.ViewObject.isVisible() - if obj.ViewObject.DisplayMode == "Hires": + if obj.ViewObject.DisplayMode == "HiRes": # check if high-resolution object is available - if hasattr(obj,"Hires"): - if obj.Hires: - if obj.Hires.isDerivedFrom("Mesh::Feature"): - m = obj.Hires.Mesh + if hasattr(obj,"HiRes"): + if obj.HiRes: + if obj.HiRes.isDerivedFrom("Mesh::Feature"): + m = obj.HiRes.Mesh else: - m = obj.Hires.Shape + m = obj.HiRes.Shape hires = m.copy() hires.Placement = obj.Placement.multiply(m.Placement) if not hires: if hasattr(obj,"CloneOf"): if obj.CloneOf: - if hasattr(obj.CloneOf,"Hires"): - if obj.CloneOf.Hires: - if obj.CloneOf.Hires.isDerivedFrom("Mesh::Feature"): - m = obj.CloneOf.Hires.Mesh + if hasattr(obj.CloneOf,"HiRes"): + if obj.CloneOf.HiRes: + if obj.CloneOf.HiRes.isDerivedFrom("Mesh::Feature"): + m = obj.CloneOf.HiRes.Mesh else: - m = obj.CloneOf.Hires.Shape + m = obj.CloneOf.HiRes.Shape hires = m.copy() hires.Placement = obj.Placement.multiply(obj.CloneOf.Placement).multiply(m.Placement) else: