diff --git a/src/Mod/BIM/Arch.py b/src/Mod/BIM/Arch.py index 45f5bf9da2..55d519f4ec 100644 --- a/src/Mod/BIM/Arch.py +++ b/src/Mod/BIM/Arch.py @@ -147,7 +147,7 @@ def makeBuilding(objectslist=None,baseobj=None,name=None): obj.IfcType = "Building" obj.CompositionType = "ELEMENT" t = QT_TRANSLATE_NOOP("App::Property","The type of this building") - obj.addProperty("App::PropertyEnumeration","BuildingType","Building",t) + obj.addProperty("App::PropertyEnumeration","BuildingType","Building",t, locked=True) obj.BuildingType = ArchBuildingPart.BuildingTypes if FreeCAD.GuiUp: obj.ViewObject.ShowLevel = False @@ -196,7 +196,7 @@ def convertFloors(floor=None): nobj.IfcType = "Building" nobj.CompositionType = "ELEMENT" t = QT_TRANSLATE_NOOP("App::Property","The type of this building") - nobj.addProperty("App::PropertyEnumeration","BuildingType","Building",t) + nobj.addProperty("App::PropertyEnumeration","BuildingType","Building",t, locked=True) nobj.BuildingType = ArchBuildingPart.BuildingTypes label = obj.Label for parent in obj.InList: diff --git a/src/Mod/BIM/ArchAxis.py b/src/Mod/BIM/ArchAxis.py index d1349f1405..bdbd89482c 100644 --- a/src/Mod/BIM/ArchAxis.py +++ b/src/Mod/BIM/ArchAxis.py @@ -72,22 +72,22 @@ class _Axis: pl = obj.PropertiesList if not "Distances" in pl: - obj.addProperty("App::PropertyFloatList","Distances","Axis", QT_TRANSLATE_NOOP("App::Property","The intervals between axes")) + obj.addProperty("App::PropertyFloatList","Distances","Axis", QT_TRANSLATE_NOOP("App::Property","The intervals between axes"), locked=True) if not "Angles" in pl: - obj.addProperty("App::PropertyFloatList","Angles","Axis", QT_TRANSLATE_NOOP("App::Property","The angles of each axis")) + obj.addProperty("App::PropertyFloatList","Angles","Axis", QT_TRANSLATE_NOOP("App::Property","The angles of each axis"), locked=True) if not "Labels" in pl: - obj.addProperty("App::PropertyStringList","Labels","Axis", QT_TRANSLATE_NOOP("App::Property","The label of each axis")) + obj.addProperty("App::PropertyStringList","Labels","Axis", QT_TRANSLATE_NOOP("App::Property","The label of each axis"), locked=True) if not "CustomNumber" in pl: - obj.addProperty("App::PropertyString","CustomNumber","Axis", QT_TRANSLATE_NOOP("App::Property","An optional custom bubble number")) + obj.addProperty("App::PropertyString","CustomNumber","Axis", QT_TRANSLATE_NOOP("App::Property","An optional custom bubble number"), locked=True) if not "Length" in pl: - obj.addProperty("App::PropertyLength","Length","Axis", QT_TRANSLATE_NOOP("App::Property","The length of the axes")) + obj.addProperty("App::PropertyLength","Length","Axis", QT_TRANSLATE_NOOP("App::Property","The length of the axes"), locked=True) obj.Length=3000 if not "Placement" in pl: - obj.addProperty("App::PropertyPlacement","Placement","Base","") + obj.addProperty("App::PropertyPlacement","Placement","Base","", locked=True) if not "Shape" in pl: - obj.addProperty("Part::PropertyPartShape","Shape","Base","") + obj.addProperty("Part::PropertyPartShape","Shape","Base","", locked=True) if not "Limit" in pl: - obj.addProperty("App::PropertyLength","Limit","Axis", QT_TRANSLATE_NOOP("App::Property","If not zero, the axes are not represented as one full line but as two lines of the given length")) + obj.addProperty("App::PropertyLength","Limit","Axis", QT_TRANSLATE_NOOP("App::Property","If not zero, the axes are not represented as one full line but as two lines of the given length"), locked=True) obj.Limit=0 self.Type = "Axis" @@ -185,38 +185,38 @@ class _ViewProviderAxis: ts = params.get_param("textheight") * params.get_param("DefaultAnnoScaleMultiplier") pl = vobj.PropertiesList if not "BubbleSize" in pl: - vobj.addProperty("App::PropertyLength","BubbleSize","Axis", QT_TRANSLATE_NOOP("App::Property","The size of the axis bubbles")) + vobj.addProperty("App::PropertyLength","BubbleSize","Axis", QT_TRANSLATE_NOOP("App::Property","The size of the axis bubbles"), locked=True) vobj.BubbleSize = ts * 1.42 if not "NumberingStyle" in pl: - vobj.addProperty("App::PropertyEnumeration","NumberingStyle","Axis", QT_TRANSLATE_NOOP("App::Property","The numbering style")) + vobj.addProperty("App::PropertyEnumeration","NumberingStyle","Axis", QT_TRANSLATE_NOOP("App::Property","The numbering style"), locked=True) vobj.NumberingStyle = ["1,2,3","01,02,03","001,002,003","A,B,C","a,b,c","I,II,III","L0,L1,L2"] vobj.NumberingStyle = "1,2,3" if not "DrawStyle" in pl: - vobj.addProperty("App::PropertyEnumeration","DrawStyle","Axis",QT_TRANSLATE_NOOP("App::Property","The type of line to draw this axis")) + vobj.addProperty("App::PropertyEnumeration","DrawStyle","Axis",QT_TRANSLATE_NOOP("App::Property","The type of line to draw this axis"), locked=True) vobj.DrawStyle = ["Solid","Dashed","Dotted","Dashdot"] vobj.DrawStyle = "Dashdot" if not "BubblePosition" in pl: - vobj.addProperty("App::PropertyEnumeration","BubblePosition","Axis",QT_TRANSLATE_NOOP("App::Property","Where to add bubbles to this axis: Start, end, both or none")) + vobj.addProperty("App::PropertyEnumeration","BubblePosition","Axis",QT_TRANSLATE_NOOP("App::Property","Where to add bubbles to this axis: Start, end, both or none"), locked=True) vobj.BubblePosition = ["Start","End","Both","None","Arrow left","Arrow right","Bar left","Bar right"] if not "LineWidth" in pl: - vobj.addProperty("App::PropertyFloat","LineWidth","Axis",QT_TRANSLATE_NOOP("App::Property","The line width to draw this axis")) + vobj.addProperty("App::PropertyFloat","LineWidth","Axis",QT_TRANSLATE_NOOP("App::Property","The line width to draw this axis"), locked=True) vobj.LineWidth = 1 if not "LineColor" in pl: - vobj.addProperty("App::PropertyColor","LineColor","Axis",QT_TRANSLATE_NOOP("App::Property","The color of this axis")) + vobj.addProperty("App::PropertyColor","LineColor","Axis",QT_TRANSLATE_NOOP("App::Property","The color of this axis"), locked=True) vobj.LineColor = ArchCommands.getDefaultColor("Helpers") if not "StartNumber" in pl: - vobj.addProperty("App::PropertyInteger","StartNumber","Axis",QT_TRANSLATE_NOOP("App::Property","The number of the first axis")) + vobj.addProperty("App::PropertyInteger","StartNumber","Axis",QT_TRANSLATE_NOOP("App::Property","The number of the first axis"), locked=True) vobj.StartNumber = 1 if not "FontName" in pl: - vobj.addProperty("App::PropertyFont","FontName","Axis",QT_TRANSLATE_NOOP("App::Property","The font to use for texts")) + vobj.addProperty("App::PropertyFont","FontName","Axis",QT_TRANSLATE_NOOP("App::Property","The font to use for texts"), locked=True) vobj.FontName = params.get_param("textfont") if not "FontSize" in pl: - vobj.addProperty("App::PropertyLength","FontSize","Axis",QT_TRANSLATE_NOOP("App::Property","The font size")) + vobj.addProperty("App::PropertyLength","FontSize","Axis",QT_TRANSLATE_NOOP("App::Property","The font size"), locked=True) vobj.FontSize = ts if not "ShowLabel" in pl: vobj.addProperty("App::PropertyBool","ShowLabel","Axis",QT_TRANSLATE_NOOP("App::Property","If true, show the labels")) if not "LabelOffset" in pl: - vobj.addProperty("App::PropertyPlacement","LabelOffset","Axis",QT_TRANSLATE_NOOP("App::Property","A transformation to apply to each label")) + vobj.addProperty("App::PropertyPlacement","LabelOffset","Axis",QT_TRANSLATE_NOOP("App::Property","A transformation to apply to each label"), locked=True) def onDocumentRestored(self,vobj): diff --git a/src/Mod/BIM/ArchAxisSystem.py b/src/Mod/BIM/ArchAxisSystem.py index 150b5b65bc..558f2ccef7 100644 --- a/src/Mod/BIM/ArchAxisSystem.py +++ b/src/Mod/BIM/ArchAxisSystem.py @@ -65,9 +65,9 @@ class _AxisSystem: pl = obj.PropertiesList if not "Axes" in pl: - obj.addProperty("App::PropertyLinkList","Axes","AxisSystem", QT_TRANSLATE_NOOP("App::Property","The axes this system is made of")) + obj.addProperty("App::PropertyLinkList","Axes","AxisSystem", QT_TRANSLATE_NOOP("App::Property","The axes this system is made of"), locked=True) if not "Placement" in pl: - obj.addProperty("App::PropertyPlacement","Placement","AxisSystem",QT_TRANSLATE_NOOP("App::Property","The placement of this axis system")) + obj.addProperty("App::PropertyPlacement","Placement","AxisSystem",QT_TRANSLATE_NOOP("App::Property","The placement of this axis system"), locked=True) self.Type = "AxisSystem" def onDocumentRestored(self,obj): diff --git a/src/Mod/BIM/ArchBuilding.py b/src/Mod/BIM/ArchBuilding.py index 73b0e85980..cf0f2a0fe8 100644 --- a/src/Mod/BIM/ArchBuilding.py +++ b/src/Mod/BIM/ArchBuilding.py @@ -282,7 +282,7 @@ class _Building(ArchFloor._Floor): pl = obj.PropertiesList if not "BuildingType" in pl: - obj.addProperty("App::PropertyEnumeration","BuildingType","Arch",QT_TRANSLATE_NOOP("App::Property","The type of this building")) + obj.addProperty("App::PropertyEnumeration","BuildingType","Arch",QT_TRANSLATE_NOOP("App::Property","The type of this building"), locked=True) obj.BuildingType = BuildingTypes obj.setEditorMode('Height',2) self.Type = "Building" diff --git a/src/Mod/BIM/ArchBuildingPart.py b/src/Mod/BIM/ArchBuildingPart.py index bb94612820..2a28603cda 100644 --- a/src/Mod/BIM/ArchBuildingPart.py +++ b/src/Mod/BIM/ArchBuildingPart.py @@ -218,28 +218,28 @@ class BuildingPart(ArchIFC.IfcProduct): pl = obj.PropertiesList if not "Height" in pl: - obj.addProperty("App::PropertyLength","Height","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The height of this object")) + obj.addProperty("App::PropertyLength","Height","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The height of this object"), locked=True) if not "HeightPropagate" in pl: - obj.addProperty("App::PropertyBool","HeightPropagate","Children",QT_TRANSLATE_NOOP("App::Property","If true, the height value propagates to contained objects if the height of those objects is set to 0")) + obj.addProperty("App::PropertyBool","HeightPropagate","Children",QT_TRANSLATE_NOOP("App::Property","If true, the height value propagates to contained objects if the height of those objects is set to 0"), locked=True) obj.HeightPropagate = True if not "LevelOffset" in pl: - obj.addProperty("App::PropertyDistance","LevelOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The level of the (0,0,0) point of this level")) + obj.addProperty("App::PropertyDistance","LevelOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The level of the (0,0,0) point of this level"), locked=True) if not "Area" in pl: - obj.addProperty("App::PropertyArea","Area", "BuildingPart",QT_TRANSLATE_NOOP("App::Property","The computed floor area of this floor")) + obj.addProperty("App::PropertyArea","Area", "BuildingPart",QT_TRANSLATE_NOOP("App::Property","The computed floor area of this floor"), locked=True) if not "Description" in pl: - obj.addProperty("App::PropertyString","Description","Component",QT_TRANSLATE_NOOP("App::Property","An optional description for this component")) + obj.addProperty("App::PropertyString","Description","Component",QT_TRANSLATE_NOOP("App::Property","An optional description for this component"), locked=True) if not "Tag" in pl: - obj.addProperty("App::PropertyString","Tag","Component",QT_TRANSLATE_NOOP("App::Property","An optional tag for this component")) + obj.addProperty("App::PropertyString","Tag","Component",QT_TRANSLATE_NOOP("App::Property","An optional tag for this component"), locked=True) if not "Shape" in pl: - obj.addProperty("Part::PropertyPartShape","Shape","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The shape of this object")) + obj.addProperty("Part::PropertyPartShape","Shape","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The shape of this object"), locked=True) if not "SavedInventor" in pl: - obj.addProperty("App::PropertyFileIncluded","SavedInventor","BuildingPart",QT_TRANSLATE_NOOP("App::Property","This property stores an OpenInventor representation for this object")) + obj.addProperty("App::PropertyFileIncluded","SavedInventor","BuildingPart",QT_TRANSLATE_NOOP("App::Property","This property stores an OpenInventor representation for this object"), locked=True) obj.setEditorMode("SavedInventor",2) if not "OnlySolids" in pl: - obj.addProperty("App::PropertyBool","OnlySolids","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, only solids will be collected by this object when referenced from other files")) + obj.addProperty("App::PropertyBool","OnlySolids","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, only solids will be collected by this object when referenced from other files"), locked=True) obj.OnlySolids = True if not "MaterialsTable" in pl: - obj.addProperty("App::PropertyMap","MaterialsTable","BuildingPart",QT_TRANSLATE_NOOP("App::Property","A MaterialName:SolidIndexesList map that relates material names with solid indexes to be used when referencing this object from other files")) + obj.addProperty("App::PropertyMap","MaterialsTable","BuildingPart",QT_TRANSLATE_NOOP("App::Property","A MaterialName:SolidIndexesList map that relates material names with solid indexes to be used when referencing this object from other files"), locked=True) self.Type = "BuildingPart" @@ -442,87 +442,87 @@ class ViewProviderBuildingPart: pl = vobj.PropertiesList if not "LineWidth" in pl: - vobj.addProperty("App::PropertyFloat","LineWidth","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The line width of this object")) + vobj.addProperty("App::PropertyFloat","LineWidth","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The line width of this object"), locked=True) vobj.LineWidth = 1 if not "OverrideUnit" in pl: - vobj.addProperty("App::PropertyString","OverrideUnit","BuildingPart",QT_TRANSLATE_NOOP("App::Property","An optional unit to express levels")) + vobj.addProperty("App::PropertyString","OverrideUnit","BuildingPart",QT_TRANSLATE_NOOP("App::Property","An optional unit to express levels"), locked=True) if not "DisplayOffset" in pl: - vobj.addProperty("App::PropertyPlacement","DisplayOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","A transformation to apply to the level mark")) + vobj.addProperty("App::PropertyPlacement","DisplayOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","A transformation to apply to the level mark"), locked=True) vobj.DisplayOffset = FreeCAD.Placement(FreeCAD.Vector(0,0,0),FreeCAD.Rotation(FreeCAD.Vector(1,0,0),90)) if not "ShowLevel" in pl: - vobj.addProperty("App::PropertyBool","ShowLevel","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, show the level")) + vobj.addProperty("App::PropertyBool","ShowLevel","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, show the level"), locked=True) vobj.ShowLevel = True if not "ShowUnit" in pl: - vobj.addProperty("App::PropertyBool","ShowUnit","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, show the unit on the level tag")) + vobj.addProperty("App::PropertyBool","ShowUnit","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, show the unit on the level tag"), locked=True) if not "OriginOffset" in pl: - vobj.addProperty("App::PropertyBool","OriginOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, display offset will affect the origin mark too")) + vobj.addProperty("App::PropertyBool","OriginOffset","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, display offset will affect the origin mark too"), locked=True) if not "ShowLabel" in pl: - vobj.addProperty("App::PropertyBool","ShowLabel","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, the object's label is displayed")) + vobj.addProperty("App::PropertyBool","ShowLabel","BuildingPart",QT_TRANSLATE_NOOP("App::Property","If true, the object's label is displayed"), locked=True) vobj.ShowLabel = True if not "FontName" in pl: - vobj.addProperty("App::PropertyFont","FontName","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The font to be used for texts")) + vobj.addProperty("App::PropertyFont","FontName","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The font to be used for texts"), locked=True) vobj.FontName = params.get_param("textfont") if not "FontSize" in pl: - vobj.addProperty("App::PropertyLength","FontSize","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The font size of texts")) + vobj.addProperty("App::PropertyLength","FontSize","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The font size of texts"), locked=True) vobj.FontSize = params.get_param("textheight") * params.get_param("DefaultAnnoScaleMultiplier") if not "DiffuseColor" in pl: - vobj.addProperty("App::PropertyColorList","DiffuseColor","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The individual face colors")) + vobj.addProperty("App::PropertyColorList","DiffuseColor","BuildingPart",QT_TRANSLATE_NOOP("App::Property","The individual face colors"), locked=True) # Interaction properties if not "SetWorkingPlane" in pl: - vobj.addProperty("App::PropertyBool","SetWorkingPlane","Interaction",QT_TRANSLATE_NOOP("App::Property","If true, when activated, the working plane will automatically adapt to this level")) + vobj.addProperty("App::PropertyBool","SetWorkingPlane","Interaction",QT_TRANSLATE_NOOP("App::Property","If true, when activated, the working plane will automatically adapt to this level"), locked=True) vobj.SetWorkingPlane = True if not "AutoWorkingPlane" in pl: - vobj.addProperty("App::PropertyBool","AutoWorkingPlane","Interaction",QT_TRANSLATE_NOOP("App::Property","If set to True, the working plane will be kept on Auto mode")) + vobj.addProperty("App::PropertyBool","AutoWorkingPlane","Interaction",QT_TRANSLATE_NOOP("App::Property","If set to True, the working plane will be kept on Auto mode"), locked=True) if not "ViewData" in pl: - vobj.addProperty("App::PropertyFloatList","ViewData","Interaction",QT_TRANSLATE_NOOP("App::Property","Camera position data associated with this object")) + vobj.addProperty("App::PropertyFloatList","ViewData","Interaction",QT_TRANSLATE_NOOP("App::Property","Camera position data associated with this object"), locked=True) vobj.setEditorMode("ViewData",2) if not "RestoreView" in pl: - vobj.addProperty("App::PropertyBool","RestoreView","Interaction",QT_TRANSLATE_NOOP("App::Property","If set, the view stored in this object will be restored on double-click")) + vobj.addProperty("App::PropertyBool","RestoreView","Interaction",QT_TRANSLATE_NOOP("App::Property","If set, the view stored in this object will be restored on double-click"), locked=True) if not "DoubleClickActivates" in pl: - vobj.addProperty("App::PropertyBool","DoubleClickActivates","Interaction",QT_TRANSLATE_NOOP("App::Property","If True, double-clicking this object in the tree activates it")) + vobj.addProperty("App::PropertyBool","DoubleClickActivates","Interaction",QT_TRANSLATE_NOOP("App::Property","If True, double-clicking this object in the tree activates it"), locked=True) # inventor saving if not "SaveInventor" in pl: - vobj.addProperty("App::PropertyBool","SaveInventor","Interaction",QT_TRANSLATE_NOOP("App::Property","If this is enabled, the OpenInventor representation of this object will be saved in the FreeCAD file, allowing to reference it in other files in lightweight mode.")) + vobj.addProperty("App::PropertyBool","SaveInventor","Interaction",QT_TRANSLATE_NOOP("App::Property","If this is enabled, the OpenInventor representation of this object will be saved in the FreeCAD file, allowing to reference it in other files in lightweight mode."), locked=True) if not "SavedInventor" in pl: - vobj.addProperty("App::PropertyFileIncluded","SavedInventor","Interaction",QT_TRANSLATE_NOOP("App::Property","A slot to save the OpenInventor representation of this object, if enabled")) + vobj.addProperty("App::PropertyFileIncluded","SavedInventor","Interaction",QT_TRANSLATE_NOOP("App::Property","A slot to save the OpenInventor representation of this object, if enabled"), locked=True) vobj.setEditorMode("SavedInventor",2) # children properties if not "ChildrenOverride" in pl: - vobj.addProperty("App::PropertyBool","ChildrenOverride","Children",QT_TRANSLATE_NOOP("App::Property","If true, show the objects contained in this Building Part will adopt these line, color and transparency settings")) + vobj.addProperty("App::PropertyBool","ChildrenOverride","Children",QT_TRANSLATE_NOOP("App::Property","If true, show the objects contained in this Building Part will adopt these line, color and transparency settings"), locked=True) if not "ChildrenLineWidth" in pl: - vobj.addProperty("App::PropertyFloat","ChildrenLineWidth","Children",QT_TRANSLATE_NOOP("App::Property","The line width of child objects")) + vobj.addProperty("App::PropertyFloat","ChildrenLineWidth","Children",QT_TRANSLATE_NOOP("App::Property","The line width of child objects"), locked=True) vobj.ChildrenLineWidth = params.get_param_view("DefaultShapeLineWidth") if not "ChildrenLineColor" in pl: - vobj.addProperty("App::PropertyColor","ChildrenLineColor","Children",QT_TRANSLATE_NOOP("App::Property","The line color of child objects")) + vobj.addProperty("App::PropertyColor","ChildrenLineColor","Children",QT_TRANSLATE_NOOP("App::Property","The line color of child objects"), locked=True) vobj.ChildrenLineColor = params.get_param_view("DefaultShapeLineColor") & 0xFFFFFF00 if not "ChildrenShapeColor" in pl: - vobj.addProperty("App::PropertyMaterial","ChildrenShapeColor","Children",QT_TRANSLATE_NOOP("App::Property","The shape appearance of child objects")) + vobj.addProperty("App::PropertyMaterial","ChildrenShapeColor","Children",QT_TRANSLATE_NOOP("App::Property","The shape appearance of child objects"), locked=True) vobj.ChildrenShapeColor = params.get_param_view("DefaultShapeColor") & 0xFFFFFF00 if not "ChildrenTransparency" in pl: - vobj.addProperty("App::PropertyPercent","ChildrenTransparency","Children",QT_TRANSLATE_NOOP("App::Property","The transparency of child objects")) + vobj.addProperty("App::PropertyPercent","ChildrenTransparency","Children",QT_TRANSLATE_NOOP("App::Property","The transparency of child objects"), locked=True) vobj.ChildrenTransparency = params.get_param_view("DefaultShapeTransparency") # clip properties if not "CutView" in pl: - vobj.addProperty("App::PropertyBool","CutView","Clip",QT_TRANSLATE_NOOP("App::Property","Cut the view above this level")) + vobj.addProperty("App::PropertyBool","CutView","Clip",QT_TRANSLATE_NOOP("App::Property","Cut the view above this level"), locked=True) if not "CutMargin" in pl: - vobj.addProperty("App::PropertyLength","CutMargin","Clip",QT_TRANSLATE_NOOP("App::Property","The distance between the level plane and the cut line")) + vobj.addProperty("App::PropertyLength","CutMargin","Clip",QT_TRANSLATE_NOOP("App::Property","The distance between the level plane and the cut line"), locked=True) vobj.CutMargin = 1600 if not "AutoCutView" in pl: - vobj.addProperty("App::PropertyBool","AutoCutView","Clip",QT_TRANSLATE_NOOP("App::Property","Turn cutting on when activating this level")) + vobj.addProperty("App::PropertyBool","AutoCutView","Clip",QT_TRANSLATE_NOOP("App::Property","Turn cutting on when activating this level"), locked=True) # autogroup properties if not "AutogroupSize" in pl: - vobj.addProperty("App::PropertyIntegerList","AutogroupSize","AutoGroup",QT_TRANSLATE_NOOP("App::Property","The capture box for newly created objects expressed as [XMin,YMin,ZMin,XMax,YMax,ZMax]")) + vobj.addProperty("App::PropertyIntegerList","AutogroupSize","AutoGroup",QT_TRANSLATE_NOOP("App::Property","The capture box for newly created objects expressed as [XMin,YMin,ZMin,XMax,YMax,ZMax]"), locked=True) if not "AutogroupBox" in pl: - vobj.addProperty("App::PropertyBool","AutogroupBox","AutoGroup",QT_TRANSLATE_NOOP("App::Property","Turns auto group box on/off")) + vobj.addProperty("App::PropertyBool","AutogroupBox","AutoGroup",QT_TRANSLATE_NOOP("App::Property","Turns auto group box on/off"), locked=True) if not "AutogroupAutosize" in pl: - vobj.addProperty("App::PropertyBool","AutogroupAutosize","AutoGroup",QT_TRANSLATE_NOOP("App::Property","Automatically set size from contents")) + vobj.addProperty("App::PropertyBool","AutogroupAutosize","AutoGroup",QT_TRANSLATE_NOOP("App::Property","Automatically set size from contents"), locked=True) if not "AutogroupMargin" in pl: - vobj.addProperty("App::PropertyLength","AutogroupMargin","AutoGroup",QT_TRANSLATE_NOOP("App::Property","A margin to use when autosize is turned on")) + vobj.addProperty("App::PropertyLength","AutogroupMargin","AutoGroup",QT_TRANSLATE_NOOP("App::Property","A margin to use when autosize is turned on"), locked=True) def onDocumentRestored(self,vobj): diff --git a/src/Mod/BIM/ArchComponent.py b/src/Mod/BIM/ArchComponent.py index 4263bd27ac..0eee795199 100644 --- a/src/Mod/BIM/ArchComponent.py +++ b/src/Mod/BIM/ArchComponent.py @@ -199,44 +199,44 @@ class Component(ArchIFC.IfcProduct): pl = obj.PropertiesList if not "Base" in pl: - obj.addProperty("App::PropertyLink","Base","Component",QT_TRANSLATE_NOOP("App::Property","The base object this component is built upon")) + obj.addProperty("App::PropertyLink","Base","Component",QT_TRANSLATE_NOOP("App::Property","The base object this component is built upon"), locked=True) if not "CloneOf" in pl: - obj.addProperty("App::PropertyLink","CloneOf","Component",QT_TRANSLATE_NOOP("App::Property","The object this component is cloning")) + obj.addProperty("App::PropertyLink","CloneOf","Component",QT_TRANSLATE_NOOP("App::Property","The object this component is cloning"), locked=True) if not "Additions" in pl: - obj.addProperty("App::PropertyLinkList","Additions","Component",QT_TRANSLATE_NOOP("App::Property","Other shapes that are appended to this object")) + obj.addProperty("App::PropertyLinkList","Additions","Component",QT_TRANSLATE_NOOP("App::Property","Other shapes that are appended to this object"), locked=True) if not "Subtractions" in pl: - obj.addProperty("App::PropertyLinkList","Subtractions","Component",QT_TRANSLATE_NOOP("App::Property","Other shapes that are subtracted from this object")) + obj.addProperty("App::PropertyLinkList","Subtractions","Component",QT_TRANSLATE_NOOP("App::Property","Other shapes that are subtracted from this object"), locked=True) if not "Description" in pl: - obj.addProperty("App::PropertyString","Description","Component",QT_TRANSLATE_NOOP("App::Property","An optional description for this component")) + obj.addProperty("App::PropertyString","Description","Component",QT_TRANSLATE_NOOP("App::Property","An optional description for this component"), locked=True) if not "Tag" in pl: - obj.addProperty("App::PropertyString","Tag","Component",QT_TRANSLATE_NOOP("App::Property","An optional tag for this component")) + obj.addProperty("App::PropertyString","Tag","Component",QT_TRANSLATE_NOOP("App::Property","An optional tag for this component"), locked=True) if not "StandardCode" in pl: - obj.addProperty("App::PropertyString","StandardCode","Component",QT_TRANSLATE_NOOP("App::Property","An optional standard (OmniClass, etc...) code for this component")) + obj.addProperty("App::PropertyString","StandardCode","Component",QT_TRANSLATE_NOOP("App::Property","An optional standard (OmniClass, etc...) code for this component"), locked=True) if not "Material" in pl: - obj.addProperty("App::PropertyLink","Material","Component",QT_TRANSLATE_NOOP("App::Property","A material for this object")) + obj.addProperty("App::PropertyLink","Material","Component",QT_TRANSLATE_NOOP("App::Property","A material for this object"), locked=True) if "BaseMaterial" in pl: obj.Material = obj.BaseMaterial obj.removeProperty("BaseMaterial") FreeCAD.Console.PrintMessage("Upgrading "+obj.Label+" BaseMaterial property to Material\n") if not "MoveBase" in pl: - obj.addProperty("App::PropertyBool","MoveBase","Component",QT_TRANSLATE_NOOP("App::Property","Specifies if moving this object moves its base instead")) + obj.addProperty("App::PropertyBool","MoveBase","Component",QT_TRANSLATE_NOOP("App::Property","Specifies if moving this object moves its base instead"), locked=True) obj.MoveBase = params.get_param_arch("MoveBase") if not "MoveWithHost" in pl: - obj.addProperty("App::PropertyBool","MoveWithHost","Component",QT_TRANSLATE_NOOP("App::Property","Specifies if this object must move together when its host is moved")) + obj.addProperty("App::PropertyBool","MoveWithHost","Component",QT_TRANSLATE_NOOP("App::Property","Specifies if this object must move together when its host is moved"), locked=True) obj.MoveWithHost = params.get_param_arch("MoveWithHost") if not "VerticalArea" in pl: - obj.addProperty("App::PropertyArea","VerticalArea","Component",QT_TRANSLATE_NOOP("App::Property","The area of all vertical faces of this object")) + obj.addProperty("App::PropertyArea","VerticalArea","Component",QT_TRANSLATE_NOOP("App::Property","The area of all vertical faces of this object"), locked=True) obj.setEditorMode("VerticalArea",1) if not "HorizontalArea" in pl: - obj.addProperty("App::PropertyArea","HorizontalArea","Component",QT_TRANSLATE_NOOP("App::Property","The area of the projection of this object onto the XY plane")) + obj.addProperty("App::PropertyArea","HorizontalArea","Component",QT_TRANSLATE_NOOP("App::Property","The area of the projection of this object onto the XY plane"), locked=True) obj.setEditorMode("HorizontalArea",1) if not "PerimeterLength" in pl: - obj.addProperty("App::PropertyLength","PerimeterLength","Component",QT_TRANSLATE_NOOP("App::Property","The perimeter length of the horizontal area")) + obj.addProperty("App::PropertyLength","PerimeterLength","Component",QT_TRANSLATE_NOOP("App::Property","The perimeter length of the horizontal area"), locked=True) obj.setEditorMode("PerimeterLength",1) if not "HiRes" in pl: - obj.addProperty("App::PropertyLink","HiRes","Component",QT_TRANSLATE_NOOP("App::Property","An optional higher-resolution mesh or shape for this object")) + obj.addProperty("App::PropertyLink","HiRes","Component",QT_TRANSLATE_NOOP("App::Property","An optional higher-resolution mesh or shape for this object"), locked=True) if not "Axis" in pl: - obj.addProperty("App::PropertyLink","Axis","Component",QT_TRANSLATE_NOOP("App::Property","An optional axis or axis system on which this object should be duplicated")) + obj.addProperty("App::PropertyLink","Axis","Component",QT_TRANSLATE_NOOP("App::Property","An optional axis or axis system on which this object should be duplicated"), locked=True) self.Subvolume = None #self.MoveWithHost = False @@ -1196,7 +1196,7 @@ class ViewProviderComponent: """ if not "UseMaterialColor" in vobj.PropertiesList: - vobj.addProperty("App::PropertyBool","UseMaterialColor","Component",QT_TRANSLATE_NOOP("App::Property","Use the material color as this object's shape color, if available")) + vobj.addProperty("App::PropertyBool","UseMaterialColor","Component",QT_TRANSLATE_NOOP("App::Property","Use the material color as this object's shape color, if available"), locked=True) vobj.UseMaterialColor = params.get_param_arch("UseMaterialColor") def updateData(self,obj,prop): diff --git a/src/Mod/BIM/ArchCurtainWall.py b/src/Mod/BIM/ArchCurtainWall.py index a0756251ce..9246689545 100644 --- a/src/Mod/BIM/ArchCurtainWall.py +++ b/src/Mod/BIM/ArchCurtainWall.py @@ -91,21 +91,21 @@ class CurtainWall(ArchComponent.Component): vsize = 50 hsize = 50 if not "Host" in pl: - obj.addProperty("App::PropertyLink","Host","CurtainWall",QT_TRANSLATE_NOOP("App::Property","An optional host object for this curtain wall")) + obj.addProperty("App::PropertyLink","Host","CurtainWall",QT_TRANSLATE_NOOP("App::Property","An optional host object for this curtain wall"), locked=True) if not "Height" in pl: obj.addProperty("App::PropertyLength","Height","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The height of the curtain wall, if based on an edge")) + QT_TRANSLATE_NOOP("App::Property","The height of the curtain wall, if based on an edge"), locked=True) obj.Height = params.get_param_arch("WallHeight") if not "VerticalMullionNumber" in pl: obj.addProperty("App::PropertyInteger","VerticalMullionNumber","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The number of vertical mullions")) + QT_TRANSLATE_NOOP("App::Property","The number of vertical mullions"), locked=True) obj.setEditorMode("VerticalMullionNumber",1) if not "VerticalMullionAlignment" in pl: obj.addProperty("App::PropertyBool","VerticalMullionAlignment","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","If the profile of the vertical mullions get aligned with the surface or not")) + QT_TRANSLATE_NOOP("App::Property","If the profile of the vertical mullions get aligned with the surface or not"), locked=True) if not "VerticalSections" in pl: obj.addProperty("App::PropertyInteger","VerticalSections","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The number of vertical sections of this curtain wall")) + QT_TRANSLATE_NOOP("App::Property","The number of vertical sections of this curtain wall"), locked=True) obj.VerticalSections = 1 if "VerticalMullionSize" in pl: # obsolete @@ -113,25 +113,25 @@ class CurtainWall(ArchComponent.Component): obj.removeProperty("VerticalMullionSize") if not "VerticalMullionHeight" in pl: obj.addProperty("App::PropertyLength","VerticalMullionHeight","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The height of the vertical mullions profile, if no profile is used")) + QT_TRANSLATE_NOOP("App::Property","The height of the vertical mullions profile, if no profile is used"), locked=True) obj.VerticalMullionHeight = vsize if not "VerticalMullionWidth" in pl: obj.addProperty("App::PropertyLength","VerticalMullionWidth","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The width of the vertical mullions profile, if no profile is used")) + QT_TRANSLATE_NOOP("App::Property","The width of the vertical mullions profile, if no profile is used"), locked=True) obj.VerticalMullionWidth = vsize if not "VerticalMullionProfile" in pl: obj.addProperty("App::PropertyLink","VerticalMullionProfile","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","A profile for vertical mullions (disables vertical mullion size)")) + QT_TRANSLATE_NOOP("App::Property","A profile for vertical mullions (disables vertical mullion size)"), locked=True) if not "HorizontalMullionNumber" in pl: obj.addProperty("App::PropertyInteger","HorizontalMullionNumber","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The number of horizontal mullions")) + QT_TRANSLATE_NOOP("App::Property","The number of horizontal mullions"), locked=True) obj.setEditorMode("HorizontalMullionNumber",1) if not "HorizontalMullionAlignment" in pl: obj.addProperty("App::PropertyBool","HorizontalMullionAlignment","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","If the profile of the horizontal mullions gets aligned with the surface or not")) + QT_TRANSLATE_NOOP("App::Property","If the profile of the horizontal mullions gets aligned with the surface or not"), locked=True) if not "HorizontalSections" in pl: obj.addProperty("App::PropertyInteger","HorizontalSections","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The number of horizontal sections of this curtain wall")) + QT_TRANSLATE_NOOP("App::Property","The number of horizontal sections of this curtain wall"), locked=True) obj.HorizontalSections = 1 if "HorizontalMullionSize" in pl: # obsolete @@ -139,50 +139,50 @@ class CurtainWall(ArchComponent.Component): obj.removeProperty("HorizontalMullionSize") if not "HorizontalMullionHeight" in pl: obj.addProperty("App::PropertyLength","HorizontalMullionHeight","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The height of the horizontal mullions profile, if no profile is used")) + QT_TRANSLATE_NOOP("App::Property","The height of the horizontal mullions profile, if no profile is used"), locked=True) obj.HorizontalMullionHeight = hsize if not "HorizontalMullionWidth" in pl: obj.addProperty("App::PropertyLength","HorizontalMullionWidth","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The width of the horizontal mullions profile, if no profile is used")) + QT_TRANSLATE_NOOP("App::Property","The width of the horizontal mullions profile, if no profile is used"), locked=True) obj.HorizontalMullionWidth = hsize if not "HorizontalMullionProfile" in pl: obj.addProperty("App::PropertyLink","HorizontalMullionProfile","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","A profile for horizontal mullions (disables horizontal mullion size)")) + QT_TRANSLATE_NOOP("App::Property","A profile for horizontal mullions (disables horizontal mullion size)"), locked=True) if not "DiagonalMullionNumber" in pl: obj.addProperty("App::PropertyInteger","DiagonalMullionNumber","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The number of diagonal mullions")) + QT_TRANSLATE_NOOP("App::Property","The number of diagonal mullions"), locked=True) obj.setEditorMode("DiagonalMullionNumber",1) if not "DiagonalMullionSize" in pl: obj.addProperty("App::PropertyLength","DiagonalMullionSize","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The size of the diagonal mullions, if any, if no profile is used")) + QT_TRANSLATE_NOOP("App::Property","The size of the diagonal mullions, if any, if no profile is used"), locked=True) obj.DiagonalMullionSize = 50 if not "DiagonalMullionProfile" in pl: obj.addProperty("App::PropertyLink","DiagonalMullionProfile","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","A profile for diagonal mullions, if any (disables horizontal mullion size)")) + QT_TRANSLATE_NOOP("App::Property","A profile for diagonal mullions, if any (disables horizontal mullion size)"), locked=True) if not "PanelNumber" in pl: obj.addProperty("App::PropertyInteger","PanelNumber","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The number of panels")) + QT_TRANSLATE_NOOP("App::Property","The number of panels"), locked=True) obj.setEditorMode("PanelNumber",1) if not "PanelThickness" in pl: obj.addProperty("App::PropertyLength","PanelThickness","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The thickness of the panels")) + QT_TRANSLATE_NOOP("App::Property","The thickness of the panels"), locked=True) obj.PanelThickness = 20 if not "SwapHorizontalVertical" in pl: obj.addProperty("App::PropertyBool","SwapHorizontalVertical","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","Swaps horizontal and vertical lines")) + QT_TRANSLATE_NOOP("App::Property","Swaps horizontal and vertical lines"), locked=True) if not "Refine" in pl: obj.addProperty("App::PropertyBool","Refine","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","Perform subtractions between components so none overlap")) + QT_TRANSLATE_NOOP("App::Property","Perform subtractions between components so none overlap"), locked=True) if not "CenterProfiles" in pl: obj.addProperty("App::PropertyBool","CenterProfiles","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","Centers the profile over the edges or not")) + QT_TRANSLATE_NOOP("App::Property","Centers the profile over the edges or not"), locked=True) obj.CenterProfiles = True if not "VerticalDirection" in pl: obj.addProperty("App::PropertyVector","VerticalDirection","CurtainWall", - QT_TRANSLATE_NOOP("App::Property","The vertical direction reference to be used by this object to deduce vertical/horizontal directions. Keep it close to the actual vertical direction of your curtain wall")) + QT_TRANSLATE_NOOP("App::Property","The vertical direction reference to be used by this object to deduce vertical/horizontal directions. Keep it close to the actual vertical direction of your curtain wall"), locked=True) obj.VerticalDirection = FreeCAD.Vector(0,0,1) if not "OverrideEdges" in pl: # PropertyStringList - obj.addProperty("App::PropertyStringList","OverrideEdges","CurtainWall",QT_TRANSLATE_NOOP("App::Property","Input are index numbers of edges of Base ArchSketch/Sketch geometries (in Edit mode). Selected edges are used to create the shape of this Arch Curtain Wall (instead of using all edges by default). [ENHANCED by ArchSketch] GUI 'Edit Curtain Wall' Tool is provided in external Add-on ('SketchArch') to let users to select the edges interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used. Property is ignored if Base ArchSketch provided the selected edges.")) + obj.addProperty("App::PropertyStringList","OverrideEdges","CurtainWall",QT_TRANSLATE_NOOP("App::Property","Input are index numbers of edges of Base ArchSketch/Sketch geometries (in Edit mode). Selected edges are used to create the shape of this Arch Curtain Wall (instead of using all edges by default). [ENHANCED by ArchSketch] GUI 'Edit Curtain Wall' Tool is provided in external Add-on ('SketchArch') to let users to select the edges interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used. Property is ignored if Base ArchSketch provided the selected edges."), locked=True) self.Type = "CurtainWall" diff --git a/src/Mod/BIM/ArchEquipment.py b/src/Mod/BIM/ArchEquipment.py index 507b197403..dd71a37cd2 100644 --- a/src/Mod/BIM/ArchEquipment.py +++ b/src/Mod/BIM/ArchEquipment.py @@ -186,15 +186,15 @@ class _Equipment(ArchComponent.Component): pl = obj.PropertiesList if not "Model" in pl: - obj.addProperty("App::PropertyString","Model","Equipment",QT_TRANSLATE_NOOP("App::Property","The model description of this equipment")) + obj.addProperty("App::PropertyString","Model","Equipment",QT_TRANSLATE_NOOP("App::Property","The model description of this equipment"), locked=True) if not "ProductURL" in pl: - obj.addProperty("App::PropertyString","ProductURL","Equipment",QT_TRANSLATE_NOOP("App::Property","The URL of the product page of this equipment")) + obj.addProperty("App::PropertyString","ProductURL","Equipment",QT_TRANSLATE_NOOP("App::Property","The URL of the product page of this equipment"), locked=True) if not "StandardCode" in pl: - obj.addProperty("App::PropertyString","StandardCode","Equipment",QT_TRANSLATE_NOOP("App::Property","A standard code (MasterFormat, OmniClass,...)")) + obj.addProperty("App::PropertyString","StandardCode","Equipment",QT_TRANSLATE_NOOP("App::Property","A standard code (MasterFormat, OmniClass,...)"), locked=True) if not "SnapPoints" in pl: - obj.addProperty("App::PropertyVectorList","SnapPoints","Equipment",QT_TRANSLATE_NOOP("App::Property","Additional snap points for this equipment")) + obj.addProperty("App::PropertyVectorList","SnapPoints","Equipment",QT_TRANSLATE_NOOP("App::Property","Additional snap points for this equipment"), locked=True) if not "EquipmentPower" in pl: - obj.addProperty("App::PropertyFloat","EquipmentPower","Equipment",QT_TRANSLATE_NOOP("App::Property","The electric power needed by this equipment in Watts")) + obj.addProperty("App::PropertyFloat","EquipmentPower","Equipment",QT_TRANSLATE_NOOP("App::Property","The electric power needed by this equipment in Watts"), locked=True) obj.setEditorMode("VerticalArea",2) obj.setEditorMode("HorizontalArea",2) obj.setEditorMode("PerimeterLength",2) diff --git a/src/Mod/BIM/ArchFence.py b/src/Mod/BIM/ArchFence.py index cfdc722e38..9d81179ba3 100644 --- a/src/Mod/BIM/ArchFence.py +++ b/src/Mod/BIM/ArchFence.py @@ -62,24 +62,24 @@ class _Fence(ArchComponent.Component): if not "Section" in pl: obj.addProperty("App::PropertyLink", "Section", "Fence", QT_TRANSLATE_NOOP( - "App::Property", "A single section of the fence")) + "App::Property", "A single section of the fence"), locked=True) if not "Post" in pl: obj.addProperty("App::PropertyLink", "Post", "Fence", QT_TRANSLATE_NOOP( - "App::Property", "A single fence post")) + "App::Property", "A single fence post"), locked=True) if not "Path" in pl: obj.addProperty("App::PropertyLink", "Path", "Fence", QT_TRANSLATE_NOOP( - "App::Property", "The Path the fence should follow")) + "App::Property", "The Path the fence should follow"), locked=True) if not "NumberOfSections" in pl: obj.addProperty("App::PropertyInteger", "NumberOfSections", "Fence", QT_TRANSLATE_NOOP( - "App::Property", "The number of sections the fence is built of")) + "App::Property", "The number of sections the fence is built of"), locked=True) obj.setEditorMode("NumberOfSections", 1) if not "NumberOfPosts" in pl: obj.addProperty("App::PropertyInteger", "NumberOfPosts", "Fence", QT_TRANSLATE_NOOP( - "App::Property", "The number of posts used to build the fence")) + "App::Property", "The number of posts used to build the fence"), locked=True) obj.setEditorMode("NumberOfPosts", 1) self.Type = "Fence" @@ -263,7 +263,7 @@ class _ViewProviderFence(ArchComponent.ViewProviderComponent): if not "UseOriginalColors" in pl: vobj.addProperty("App::PropertyBool", "UseOriginalColors", "Fence", QT_TRANSLATE_NOOP( - "App::Property", "When true, the fence will be colored like the original post and section.")) + "App::Property", "When true, the fence will be colored like the original post and section."), locked=True) def attach(self, vobj): self.setProperties(vobj) diff --git a/src/Mod/BIM/ArchFloor.py b/src/Mod/BIM/ArchFloor.py index be93117aaf..168cab8256 100644 --- a/src/Mod/BIM/ArchFloor.py +++ b/src/Mod/BIM/ArchFloor.py @@ -210,12 +210,12 @@ class _Floor(ArchIFC.IfcProduct): ArchIFC.IfcProduct.setProperties(self, obj) pl = obj.PropertiesList if not "Height" in pl: - obj.addProperty("App::PropertyLength","Height","Floor",QT_TRANSLATE_NOOP("App::Property","The height of this object")) + obj.addProperty("App::PropertyLength","Height","Floor",QT_TRANSLATE_NOOP("App::Property","The height of this object"), locked=True) if not "Area" in pl: - obj.addProperty("App::PropertyArea","Area", "Floor",QT_TRANSLATE_NOOP("App::Property","The computed floor area of this floor")) + obj.addProperty("App::PropertyArea","Area", "Floor",QT_TRANSLATE_NOOP("App::Property","The computed floor area of this floor"), locked=True) if not hasattr(obj,"Placement"): # obj can be a Part Feature and already has a placement - obj.addProperty("App::PropertyPlacement","Placement","Base",QT_TRANSLATE_NOOP("App::Property","The placement of this object")) + obj.addProperty("App::PropertyPlacement","Placement","Base",QT_TRANSLATE_NOOP("App::Property","The placement of this object"), locked=True) self.Type = "Floor" def onDocumentRestored(self,obj): diff --git a/src/Mod/BIM/ArchFrame.py b/src/Mod/BIM/ArchFrame.py index df603bc25f..f329f819cf 100644 --- a/src/Mod/BIM/ArchFrame.py +++ b/src/Mod/BIM/ArchFrame.py @@ -65,23 +65,23 @@ class _Frame(ArchComponent.Component): pl = obj.PropertiesList if not "Profile" in pl: - obj.addProperty("App::PropertyLink","Profile","Frame",QT_TRANSLATE_NOOP("App::Property","The profile used to build this frame")) + obj.addProperty("App::PropertyLink","Profile","Frame",QT_TRANSLATE_NOOP("App::Property","The profile used to build this frame"), locked=True) if not "Align" in pl: - obj.addProperty("App::PropertyBool","Align","Frame",QT_TRANSLATE_NOOP("App::Property","Specifies if the profile must be aligned with the extrusion wires")) + obj.addProperty("App::PropertyBool","Align","Frame",QT_TRANSLATE_NOOP("App::Property","Specifies if the profile must be aligned with the extrusion wires"), locked=True) obj.Align = True if not "Offset" in pl: - obj.addProperty("App::PropertyVectorDistance","Offset","Frame",QT_TRANSLATE_NOOP("App::Property","An offset vector between the base sketch and the frame")) + obj.addProperty("App::PropertyVectorDistance","Offset","Frame",QT_TRANSLATE_NOOP("App::Property","An offset vector between the base sketch and the frame"), locked=True) if not "BasePoint" in pl: - obj.addProperty("App::PropertyInteger","BasePoint","Frame",QT_TRANSLATE_NOOP("App::Property","Crossing point of the path on the profile.")) + obj.addProperty("App::PropertyInteger","BasePoint","Frame",QT_TRANSLATE_NOOP("App::Property","Crossing point of the path on the profile."), locked=True) if not "ProfilePlacement" in pl: - obj.addProperty("App::PropertyPlacement","ProfilePlacement","Frame",QT_TRANSLATE_NOOP("App::Property","An optional additional placement to add to the profile before extruding it")) + obj.addProperty("App::PropertyPlacement","ProfilePlacement","Frame",QT_TRANSLATE_NOOP("App::Property","An optional additional placement to add to the profile before extruding it"), locked=True) if not "Rotation" in pl: - obj.addProperty("App::PropertyAngle","Rotation","Frame",QT_TRANSLATE_NOOP("App::Property","The rotation of the profile around its extrusion axis")) + obj.addProperty("App::PropertyAngle","Rotation","Frame",QT_TRANSLATE_NOOP("App::Property","The rotation of the profile around its extrusion axis"), locked=True) if not "Edges" in pl: - obj.addProperty("App::PropertyEnumeration","Edges","Frame",QT_TRANSLATE_NOOP("App::Property","The type of edges to consider")) + obj.addProperty("App::PropertyEnumeration","Edges","Frame",QT_TRANSLATE_NOOP("App::Property","The type of edges to consider"), locked=True) obj.Edges = ["All edges","Vertical edges","Horizontal edges","Bottom horizontal edges","Top horizontal edges"] if not "Fuse" in pl: - obj.addProperty("App::PropertyBool","Fuse","Frame",QT_TRANSLATE_NOOP("App::Property","If true, geometry is fused, otherwise a compound")) + obj.addProperty("App::PropertyBool","Fuse","Frame",QT_TRANSLATE_NOOP("App::Property","If true, geometry is fused, otherwise a compound"), locked=True) self.Type = "Frame" def onDocumentRestored(self,obj): diff --git a/src/Mod/BIM/ArchGrid.py b/src/Mod/BIM/ArchGrid.py index f86c27876a..527fa40d06 100644 --- a/src/Mod/BIM/ArchGrid.py +++ b/src/Mod/BIM/ArchGrid.py @@ -64,30 +64,30 @@ class ArchGrid: pl = obj.PropertiesList if not "Rows" in pl: - obj.addProperty("App::PropertyInteger","Rows","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The number of rows')) + obj.addProperty("App::PropertyInteger","Rows","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The number of rows'), locked=True) if not "Columns" in pl: - obj.addProperty("App::PropertyInteger","Columns","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The number of columns')) + obj.addProperty("App::PropertyInteger","Columns","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The number of columns'), locked=True) if not "RowSize" in pl: - obj.addProperty("App::PropertyFloatList","RowSize","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The sizes of rows')) + obj.addProperty("App::PropertyFloatList","RowSize","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The sizes of rows'), locked=True) if not "ColumnSize" in pl: - obj.addProperty("App::PropertyFloatList","ColumnSize","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The sizes of columns')) + obj.addProperty("App::PropertyFloatList","ColumnSize","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The sizes of columns'), locked=True) if not "Spans" in pl: - obj.addProperty("App::PropertyStringList","Spans","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The span ranges of cells that are merged together')) + obj.addProperty("App::PropertyStringList","Spans","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The span ranges of cells that are merged together'), locked=True) if not "PointsOutput" in pl: - obj.addProperty("App::PropertyEnumeration","PointsOutput","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The type of 3D points produced by this grid object')) + obj.addProperty("App::PropertyEnumeration","PointsOutput","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The type of 3D points produced by this grid object'), locked=True) obj.PointsOutput = ["Vertices","Edges","Vertical Edges","Horizontal Edges","Faces"] if not "Width" in pl: - obj.addProperty("App::PropertyLength","Width","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The total width of this grid')) + obj.addProperty("App::PropertyLength","Width","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The total width of this grid'), locked=True) if not "Height" in pl: - obj.addProperty("App::PropertyLength","Height","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The total height of this grid')) + obj.addProperty("App::PropertyLength","Height","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The total height of this grid'), locked=True) if not "AutoWidth" in pl: - obj.addProperty("App::PropertyLength","AutoWidth","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'Creates automatic column divisions (set to 0 to disable)')) + obj.addProperty("App::PropertyLength","AutoWidth","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'Creates automatic column divisions (set to 0 to disable)'), locked=True) if not "AutoHeight" in pl: - obj.addProperty("App::PropertyLength","AutoHeight","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'Creates automatic row divisions (set to 0 to disable)')) + obj.addProperty("App::PropertyLength","AutoHeight","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'Creates automatic row divisions (set to 0 to disable)'), locked=True) if not "Reorient" in pl: - obj.addProperty("App::PropertyBool","Reorient","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'When in edge midpoint mode, if this grid must reorient its children along edge normals or not')) + obj.addProperty("App::PropertyBool","Reorient","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'When in edge midpoint mode, if this grid must reorient its children along edge normals or not'), locked=True) if not "HiddenFaces" in pl: - obj.addProperty("App::PropertyIntegerList","HiddenFaces","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The indices of faces to hide')) + obj.addProperty("App::PropertyIntegerList","HiddenFaces","Grid",QT_TRANSLATE_NOOP("Arch_Grid",'The indices of faces to hide'), locked=True) self.Type = "Grid" def onDocumentRestored(self,obj): diff --git a/src/Mod/BIM/ArchIFC.py b/src/Mod/BIM/ArchIFC.py index 1625965e8c..2d2846ca10 100644 --- a/src/Mod/BIM/ArchIFC.py +++ b/src/Mod/BIM/ArchIFC.py @@ -68,14 +68,14 @@ class IfcRoot: """ if not "IfcData" in obj.PropertiesList: - obj.addProperty("App::PropertyMap","IfcData","IFC",QT_TRANSLATE_NOOP("App::Property","IFC data")) + obj.addProperty("App::PropertyMap","IfcData","IFC",QT_TRANSLATE_NOOP("App::Property","IFC data"), locked=True) if not "IfcType" in obj.PropertiesList: - obj.addProperty("App::PropertyEnumeration","IfcType","IFC",QT_TRANSLATE_NOOP("App::Property","The type of this object")) + obj.addProperty("App::PropertyEnumeration","IfcType","IFC",QT_TRANSLATE_NOOP("App::Property","The type of this object"), locked=True) obj.IfcType = self.getCanonicalisedIfcTypes() if not "IfcProperties" in obj.PropertiesList: - obj.addProperty("App::PropertyMap","IfcProperties","IFC",QT_TRANSLATE_NOOP("App::Property","IFC properties of this object")) + obj.addProperty("App::PropertyMap","IfcProperties","IFC",QT_TRANSLATE_NOOP("App::Property","IFC properties of this object"), locked=True) self.migrateDeprecatedAttributes(obj) diff --git a/src/Mod/BIM/ArchMaterial.py b/src/Mod/BIM/ArchMaterial.py index 7a20d342fa..f6eaf4c053 100644 --- a/src/Mod/BIM/ArchMaterial.py +++ b/src/Mod/BIM/ArchMaterial.py @@ -168,17 +168,17 @@ class _ArchMaterial: def setProperties(self,obj): if not "Description" in obj.PropertiesList: - obj.addProperty("App::PropertyString","Description","Material",QT_TRANSLATE_NOOP("App::Property","A description for this material")) + obj.addProperty("App::PropertyString","Description","Material",QT_TRANSLATE_NOOP("App::Property","A description for this material"), locked=True) if not "StandardCode" in obj.PropertiesList: - obj.addProperty("App::PropertyString","StandardCode","Material",QT_TRANSLATE_NOOP("App::Property","A standard code (MasterFormat, OmniClass,...)")) + obj.addProperty("App::PropertyString","StandardCode","Material",QT_TRANSLATE_NOOP("App::Property","A standard code (MasterFormat, OmniClass,...)"), locked=True) if not "ProductURL" in obj.PropertiesList: - obj.addProperty("App::PropertyString","ProductURL","Material",QT_TRANSLATE_NOOP("App::Property","A URL where to find information about this material")) + obj.addProperty("App::PropertyString","ProductURL","Material",QT_TRANSLATE_NOOP("App::Property","A URL where to find information about this material"), locked=True) if not "Transparency" in obj.PropertiesList: - obj.addProperty("App::PropertyPercent","Transparency","Material",QT_TRANSLATE_NOOP("App::Property","The transparency value of this material")) + obj.addProperty("App::PropertyPercent","Transparency","Material",QT_TRANSLATE_NOOP("App::Property","The transparency value of this material"), locked=True) if not "Color" in obj.PropertiesList: - obj.addProperty("App::PropertyColor","Color","Material",QT_TRANSLATE_NOOP("App::Property","The color of this material")) + obj.addProperty("App::PropertyColor","Color","Material",QT_TRANSLATE_NOOP("App::Property","The color of this material"), locked=True) if not "SectionColor" in obj.PropertiesList: - obj.addProperty("App::PropertyColor","SectionColor","Material",QT_TRANSLATE_NOOP("App::Property","The color of this material when cut")) + obj.addProperty("App::PropertyColor","SectionColor","Material",QT_TRANSLATE_NOOP("App::Property","The color of this material when cut"), locked=True) def isSameColor(self,c1,c2): @@ -624,10 +624,10 @@ class _ArchMultiMaterial: def __init__(self,obj): self.Type = "MultiMaterial" obj.Proxy = self - obj.addProperty("App::PropertyString","Description","Arch",QT_TRANSLATE_NOOP("App::Property","A description for this material")) - obj.addProperty("App::PropertyStringList","Names","Arch",QT_TRANSLATE_NOOP("App::Property","The list of layer names")) - obj.addProperty("App::PropertyLinkList","Materials","Arch",QT_TRANSLATE_NOOP("App::Property","The list of layer materials")) - obj.addProperty("App::PropertyFloatList","Thicknesses","Arch",QT_TRANSLATE_NOOP("App::Property","The list of layer thicknesses")) + obj.addProperty("App::PropertyString","Description","Arch",QT_TRANSLATE_NOOP("App::Property","A description for this material"), locked=True) + obj.addProperty("App::PropertyStringList","Names","Arch",QT_TRANSLATE_NOOP("App::Property","The list of layer names"), locked=True) + obj.addProperty("App::PropertyLinkList","Materials","Arch",QT_TRANSLATE_NOOP("App::Property","The list of layer materials"), locked=True) + obj.addProperty("App::PropertyFloatList","Thicknesses","Arch",QT_TRANSLATE_NOOP("App::Property","The list of layer thicknesses"), locked=True) def dumps(self): if hasattr(self,"Type"): diff --git a/src/Mod/BIM/ArchPanel.py b/src/Mod/BIM/ArchPanel.py index 0db6c5fd10..6c141973af 100644 --- a/src/Mod/BIM/ArchPanel.py +++ b/src/Mod/BIM/ArchPanel.py @@ -74,36 +74,36 @@ class _Panel(ArchComponent.Component): pl = obj.PropertiesList if not "Length" in pl: - obj.addProperty("App::PropertyLength","Length","Panel", QT_TRANSLATE_NOOP("App::Property","The length of this element, if not based on a profile")) + obj.addProperty("App::PropertyLength","Length","Panel", QT_TRANSLATE_NOOP("App::Property","The length of this element, if not based on a profile"), locked=True) if not "Width" in pl: - obj.addProperty("App::PropertyLength","Width","Panel", QT_TRANSLATE_NOOP("App::Property","The width of this element, if not based on a profile")) + obj.addProperty("App::PropertyLength","Width","Panel", QT_TRANSLATE_NOOP("App::Property","The width of this element, if not based on a profile"), locked=True) if not "Thickness" in pl: - obj.addProperty("App::PropertyLength","Thickness","Panel",QT_TRANSLATE_NOOP("App::Property","The thickness or extrusion depth of this element")) + obj.addProperty("App::PropertyLength","Thickness","Panel",QT_TRANSLATE_NOOP("App::Property","The thickness or extrusion depth of this element"), locked=True) if not "Sheets" in pl: - obj.addProperty("App::PropertyInteger","Sheets","Panel", QT_TRANSLATE_NOOP("App::Property","The number of sheets to use")) + obj.addProperty("App::PropertyInteger","Sheets","Panel", QT_TRANSLATE_NOOP("App::Property","The number of sheets to use"), locked=True) obj.Sheets = 1 if not "Offset" in pl: - obj.addProperty("App::PropertyDistance","Offset","Panel", QT_TRANSLATE_NOOP("App::Property","The offset between this panel and its baseline")) + obj.addProperty("App::PropertyDistance","Offset","Panel", QT_TRANSLATE_NOOP("App::Property","The offset between this panel and its baseline"), locked=True) if not "WaveLength" in pl: - obj.addProperty("App::PropertyLength","WaveLength","Panel", QT_TRANSLATE_NOOP("App::Property","The length of waves for corrugated elements")) + obj.addProperty("App::PropertyLength","WaveLength","Panel", QT_TRANSLATE_NOOP("App::Property","The length of waves for corrugated elements"), locked=True) if not "WaveHeight" in pl: - obj.addProperty("App::PropertyLength","WaveHeight","Panel", QT_TRANSLATE_NOOP("App::Property","The height of waves for corrugated elements")) + obj.addProperty("App::PropertyLength","WaveHeight","Panel", QT_TRANSLATE_NOOP("App::Property","The height of waves for corrugated elements"), locked=True) if not "WaveOffset" in pl: - obj.addProperty("App::PropertyDistance","WaveOffset","Panel", QT_TRANSLATE_NOOP("App::Property","The horizontal offset of waves for corrugated elements")) + obj.addProperty("App::PropertyDistance","WaveOffset","Panel", QT_TRANSLATE_NOOP("App::Property","The horizontal offset of waves for corrugated elements"), locked=True) if not "WaveDirection" in pl: - obj.addProperty("App::PropertyAngle","WaveDirection","Panel", QT_TRANSLATE_NOOP("App::Property","The direction of waves for corrugated elements")) + obj.addProperty("App::PropertyAngle","WaveDirection","Panel", QT_TRANSLATE_NOOP("App::Property","The direction of waves for corrugated elements"), locked=True) if not "WaveType" in pl: - obj.addProperty("App::PropertyEnumeration","WaveType","Panel", QT_TRANSLATE_NOOP("App::Property","The type of waves for corrugated elements")) + obj.addProperty("App::PropertyEnumeration","WaveType","Panel", QT_TRANSLATE_NOOP("App::Property","The type of waves for corrugated elements"), locked=True) obj.WaveType = ["Curved","Trapezoidal","Spikes"] if not "WaveBottom" in pl: - obj.addProperty("App::PropertyBool","WaveBottom","Panel", QT_TRANSLATE_NOOP("App::Property","If the wave also affects the bottom side or not")) + obj.addProperty("App::PropertyBool","WaveBottom","Panel", QT_TRANSLATE_NOOP("App::Property","If the wave also affects the bottom side or not"), locked=True) if not "Area" in pl: - obj.addProperty("App::PropertyArea","Area","Panel", QT_TRANSLATE_NOOP("App::Property","The area of this panel")) + obj.addProperty("App::PropertyArea","Area","Panel", QT_TRANSLATE_NOOP("App::Property","The area of this panel"), locked=True) if not "FaceMaker" in pl: - obj.addProperty("App::PropertyEnumeration","FaceMaker","Panel",QT_TRANSLATE_NOOP("App::Property","The facemaker type to use to build the profile of this object")) + obj.addProperty("App::PropertyEnumeration","FaceMaker","Panel",QT_TRANSLATE_NOOP("App::Property","The facemaker type to use to build the profile of this object"), locked=True) obj.FaceMaker = ["None","Simple","Cheese","Bullseye"] if not "Normal" in pl: - obj.addProperty("App::PropertyVector","Normal","Panel",QT_TRANSLATE_NOOP("App::Property","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)")) + obj.addProperty("App::PropertyVector","Normal","Panel",QT_TRANSLATE_NOOP("App::Property","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)"), locked=True) self.Type = "Panel" obj.setEditorMode("VerticalArea",2) obj.setEditorMode("HorizontalArea",2) @@ -505,27 +505,27 @@ class PanelCut(Draft.DraftObject): pl = obj.PropertiesList if not "Source" in pl: - obj.addProperty("App::PropertyLink","Source","PanelCut",QT_TRANSLATE_NOOP("App::Property","The linked object")) + obj.addProperty("App::PropertyLink","Source","PanelCut",QT_TRANSLATE_NOOP("App::Property","The linked object"), locked=True) if not "TagText" in pl: - obj.addProperty("App::PropertyString","TagText","PanelCut",QT_TRANSLATE_NOOP("App::Property","The text to display. Can be %tag%, %label% or %description% to display the panel tag or label")) + obj.addProperty("App::PropertyString","TagText","PanelCut",QT_TRANSLATE_NOOP("App::Property","The text to display. Can be %tag%, %label% or %description% to display the panel tag or label"), locked=True) obj.TagText = "%tag%" if not "TagSize" in pl: - obj.addProperty("App::PropertyLength","TagSize","PanelCut",QT_TRANSLATE_NOOP("App::Property","The size of the tag text")) + obj.addProperty("App::PropertyLength","TagSize","PanelCut",QT_TRANSLATE_NOOP("App::Property","The size of the tag text"), locked=True) obj.TagSize = 10 if not "TagPosition" in pl: - obj.addProperty("App::PropertyVector","TagPosition","PanelCut",QT_TRANSLATE_NOOP("App::Property","The position of the tag text. Keep (0,0,0) for center position")) + obj.addProperty("App::PropertyVector","TagPosition","PanelCut",QT_TRANSLATE_NOOP("App::Property","The position of the tag text. Keep (0,0,0) for center position"), locked=True) if not "TagRotation" in pl: - obj.addProperty("App::PropertyAngle","TagRotation","PanelCut",QT_TRANSLATE_NOOP("App::Property","The rotation of the tag text")) + obj.addProperty("App::PropertyAngle","TagRotation","PanelCut",QT_TRANSLATE_NOOP("App::Property","The rotation of the tag text"), locked=True) if not "FontFile" in pl: - obj.addProperty("App::PropertyFile","FontFile","PanelCut",QT_TRANSLATE_NOOP("App::Property","The font of the tag text")) + obj.addProperty("App::PropertyFile","FontFile","PanelCut",QT_TRANSLATE_NOOP("App::Property","The font of the tag text"), locked=True) obj.FontFile = params.get_param("FontFile") if not "MakeFace" in pl: - obj.addProperty("App::PropertyBool","MakeFace","PanelCut",QT_TRANSLATE_NOOP("App::Property","If True, the object is rendered as a face, if possible.")) + obj.addProperty("App::PropertyBool","MakeFace","PanelCut",QT_TRANSLATE_NOOP("App::Property","If True, the object is rendered as a face, if possible."), locked=True) if not "AllowedAngles" in pl: - obj.addProperty("App::PropertyFloatList","AllowedAngles","PanelCut",QT_TRANSLATE_NOOP("App::Property","The allowed angles this object can be rotated to when placed on sheets")) + obj.addProperty("App::PropertyFloatList","AllowedAngles","PanelCut",QT_TRANSLATE_NOOP("App::Property","The allowed angles this object can be rotated to when placed on sheets"), locked=True) self.Type = "PanelCut" if not "CutOffset" in pl: - obj.addProperty("App::PropertyDistance","CutOffset","PanelCut",QT_TRANSLATE_NOOP("App::Property","An offset value to move the cut plane from the center point")) + obj.addProperty("App::PropertyDistance","CutOffset","PanelCut",QT_TRANSLATE_NOOP("App::Property","An offset value to move the cut plane from the center point"), locked=True) def onDocumentRestored(self,obj): @@ -698,9 +698,9 @@ class ViewProviderPanelCut(Draft.ViewProviderDraft): pl = vobj.PropertiesList if not "Margin" in pl: - vobj.addProperty("App::PropertyLength","Margin","Arch",QT_TRANSLATE_NOOP("App::Property","A margin inside the boundary")) + vobj.addProperty("App::PropertyLength","Margin","Arch",QT_TRANSLATE_NOOP("App::Property","A margin inside the boundary"), locked=True) if not "ShowMargin" in pl: - vobj.addProperty("App::PropertyBool","ShowMargin","Arch",QT_TRANSLATE_NOOP("App::Property","Turns the display of the margin on/off")) + vobj.addProperty("App::PropertyBool","ShowMargin","Arch",QT_TRANSLATE_NOOP("App::Property","Turns the display of the margin on/off"), locked=True) def onDocumentRestored(self,vobj): @@ -786,37 +786,37 @@ class PanelSheet(Draft.DraftObject): pl = obj.PropertiesList if not "Group" in pl: - obj.addProperty("App::PropertyLinkList","Group","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The linked Panel cuts")) + obj.addProperty("App::PropertyLinkList","Group","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The linked Panel cuts"), locked=True) if not "TagText" in pl: - obj.addProperty("App::PropertyString","TagText","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The tag text to display")) + obj.addProperty("App::PropertyString","TagText","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The tag text to display"), locked=True) if not "TagSize" in pl: - obj.addProperty("App::PropertyLength","TagSize","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The size of the tag text")) + obj.addProperty("App::PropertyLength","TagSize","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The size of the tag text"), locked=True) obj.TagSize = 10 if not "TagPosition" in pl: - obj.addProperty("App::PropertyVector","TagPosition","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The position of the tag text. Keep (0,0,0) for center position")) + obj.addProperty("App::PropertyVector","TagPosition","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The position of the tag text. Keep (0,0,0) for center position"), locked=True) if not "TagRotation" in pl: - obj.addProperty("App::PropertyAngle","TagRotation","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The rotation of the tag text")) + obj.addProperty("App::PropertyAngle","TagRotation","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The rotation of the tag text"), locked=True) if not "FontFile" in pl: - obj.addProperty("App::PropertyFile","FontFile","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The font of the tag text")) + obj.addProperty("App::PropertyFile","FontFile","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The font of the tag text"), locked=True) obj.FontFile = params.get_param("FontFile") if not "Width" in pl: - obj.addProperty("App::PropertyLength","Width","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The width of the sheet")) + obj.addProperty("App::PropertyLength","Width","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The width of the sheet"), locked=True) obj.Width = params.get_param_arch("PanelLength") if not "Height" in pl: - obj.addProperty("App::PropertyLength","Height","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The height of the sheet")) + obj.addProperty("App::PropertyLength","Height","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The height of the sheet"), locked=True) obj.Height = params.get_param_arch("PanelWidth") if not "FillRatio" in pl: - obj.addProperty("App::PropertyPercent","FillRatio","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The fill ratio of this sheet")) + obj.addProperty("App::PropertyPercent","FillRatio","PanelSheet",QT_TRANSLATE_NOOP("App::Property","The fill ratio of this sheet"), locked=True) obj.setEditorMode("FillRatio",2) if not "MakeFace" in pl: - obj.addProperty("App::PropertyBool","MakeFace","PanelSheet",QT_TRANSLATE_NOOP("App::Property","If True, the object is rendered as a face, if possible.")) + obj.addProperty("App::PropertyBool","MakeFace","PanelSheet",QT_TRANSLATE_NOOP("App::Property","If True, the object is rendered as a face, if possible."), locked=True) if not "GrainDirection" in pl: - obj.addProperty("App::PropertyAngle","GrainDirection","PanelSheet",QT_TRANSLATE_NOOP("App::Property","Specifies an angle for the wood grain (Clockwise, 0 is North)")) + obj.addProperty("App::PropertyAngle","GrainDirection","PanelSheet",QT_TRANSLATE_NOOP("App::Property","Specifies an angle for the wood grain (Clockwise, 0 is North)"), locked=True) if not "Scale" in pl: - obj.addProperty("App::PropertyFloat","Scale","PanelSheet", QT_TRANSLATE_NOOP("App::Property","Specifies the scale applied to each panel view.")) + obj.addProperty("App::PropertyFloat","Scale","PanelSheet", QT_TRANSLATE_NOOP("App::Property","Specifies the scale applied to each panel view."), locked=True) obj.Scale = 1.0 if not "Rotations" in pl: - obj.addProperty("App::PropertyFloatList","Rotations","PanelSheet", QT_TRANSLATE_NOOP("App::Property","A list of possible rotations for the nester")) + obj.addProperty("App::PropertyFloatList","Rotations","PanelSheet", QT_TRANSLATE_NOOP("App::Property","A list of possible rotations for the nester"), locked=True) self.Type = "PanelSheet" def onDocumentRestored(self, obj): @@ -961,11 +961,11 @@ class ViewProviderPanelSheet(Draft.ViewProviderDraft): pl = vobj.PropertiesList if not "Margin" in pl: - vobj.addProperty("App::PropertyLength","Margin","PanelSheet",QT_TRANSLATE_NOOP("App::Property","A margin inside the boundary")) + vobj.addProperty("App::PropertyLength","Margin","PanelSheet",QT_TRANSLATE_NOOP("App::Property","A margin inside the boundary"), locked=True) if not "ShowMargin" in pl: - vobj.addProperty("App::PropertyBool","ShowMargin","PanelSheet",QT_TRANSLATE_NOOP("App::Property","Turns the display of the margin on/off")) + vobj.addProperty("App::PropertyBool","ShowMargin","PanelSheet",QT_TRANSLATE_NOOP("App::Property","Turns the display of the margin on/off"), locked=True) if not "ShowGrain" in pl: - vobj.addProperty("App::PropertyBool","ShowGrain","PanelSheet",QT_TRANSLATE_NOOP("App::Property","Turns the display of the wood grain texture on/off")) + vobj.addProperty("App::PropertyBool","ShowGrain","PanelSheet",QT_TRANSLATE_NOOP("App::Property","Turns the display of the wood grain texture on/off"), locked=True) def onDocumentRestored(self,vobj): diff --git a/src/Mod/BIM/ArchPipe.py b/src/Mod/BIM/ArchPipe.py index 9b354fbafc..3053a67519 100644 --- a/src/Mod/BIM/ArchPipe.py +++ b/src/Mod/BIM/ArchPipe.py @@ -73,25 +73,25 @@ class _ArchPipe(ArchComponent.Component): pl = obj.PropertiesList if not "Diameter" in pl: - obj.addProperty("App::PropertyLength", "Diameter", "Pipe", QT_TRANSLATE_NOOP("App::Property","The diameter of this pipe, if not based on a profile")) + obj.addProperty("App::PropertyLength", "Diameter", "Pipe", QT_TRANSLATE_NOOP("App::Property","The diameter of this pipe, if not based on a profile"), locked=True) if not "Width" in pl: - obj.addProperty("App::PropertyLength", "Width", "Pipe", QT_TRANSLATE_NOOP("App::Property","The width of this pipe, if not based on a profile")) + obj.addProperty("App::PropertyLength", "Width", "Pipe", QT_TRANSLATE_NOOP("App::Property","The width of this pipe, if not based on a profile"), locked=True) obj.setPropertyStatus("Width", "Hidden") if not "Height" in pl: - obj.addProperty("App::PropertyLength", "Height", "Pipe", QT_TRANSLATE_NOOP("App::Property","The height of this pipe, if not based on a profile")) + obj.addProperty("App::PropertyLength", "Height", "Pipe", QT_TRANSLATE_NOOP("App::Property","The height of this pipe, if not based on a profile"), locked=True) obj.setPropertyStatus("Height", "Hidden") if not "Length" in pl: - obj.addProperty("App::PropertyLength", "Length", "Pipe", QT_TRANSLATE_NOOP("App::Property","The length of this pipe, if not based on an edge")) + obj.addProperty("App::PropertyLength", "Length", "Pipe", QT_TRANSLATE_NOOP("App::Property","The length of this pipe, if not based on an edge"), locked=True) if not "Profile" in pl: - obj.addProperty("App::PropertyLink", "Profile", "Pipe", QT_TRANSLATE_NOOP("App::Property","An optional closed profile to base this pipe on")) + obj.addProperty("App::PropertyLink", "Profile", "Pipe", QT_TRANSLATE_NOOP("App::Property","An optional closed profile to base this pipe on"), locked=True) if not "OffsetStart" in pl: - obj.addProperty("App::PropertyLength", "OffsetStart", "Pipe", QT_TRANSLATE_NOOP("App::Property","Offset from the start point")) + obj.addProperty("App::PropertyLength", "OffsetStart", "Pipe", QT_TRANSLATE_NOOP("App::Property","Offset from the start point"), locked=True) if not "OffsetEnd" in pl: - obj.addProperty("App::PropertyLength", "OffsetEnd", "Pipe", QT_TRANSLATE_NOOP("App::Property","Offset from the end point")) + obj.addProperty("App::PropertyLength", "OffsetEnd", "Pipe", QT_TRANSLATE_NOOP("App::Property","Offset from the end point"), locked=True) if not "WallThickness" in pl: - obj.addProperty("App::PropertyLength", "WallThickness","Pipe", QT_TRANSLATE_NOOP("App::Property","The wall thickness of this pipe, if not based on a profile")) + obj.addProperty("App::PropertyLength", "WallThickness","Pipe", QT_TRANSLATE_NOOP("App::Property","The wall thickness of this pipe, if not based on a profile"), locked=True) if not "ProfileType" in pl: - obj.addProperty("App::PropertyEnumeration", "ProfileType", "Pipe", QT_TRANSLATE_NOOP("App::Property","If not based on a profile, this controls the profile of this pipe")) + obj.addProperty("App::PropertyEnumeration", "ProfileType", "Pipe", QT_TRANSLATE_NOOP("App::Property","If not based on a profile, this controls the profile of this pipe"), locked=True) obj.ProfileType = ["Circle", "Square", "Rectangle"] self.Type = "Pipe" @@ -287,11 +287,11 @@ class _ArchPipeConnector(ArchComponent.Component): pl = obj.PropertiesList if not "Radius" in pl: - obj.addProperty("App::PropertyLength", "Radius", "PipeConnector", QT_TRANSLATE_NOOP("App::Property","The curvature radius of this connector")) + obj.addProperty("App::PropertyLength", "Radius", "PipeConnector", QT_TRANSLATE_NOOP("App::Property","The curvature radius of this connector"), locked=True) if not "Pipes" in pl: - obj.addProperty("App::PropertyLinkList", "Pipes", "PipeConnector", QT_TRANSLATE_NOOP("App::Property","The pipes linked by this connector")) + obj.addProperty("App::PropertyLinkList", "Pipes", "PipeConnector", QT_TRANSLATE_NOOP("App::Property","The pipes linked by this connector"), locked=True) if not "ConnectorType" in pl: - obj.addProperty("App::PropertyEnumeration", "ConnectorType", "PipeConnector", QT_TRANSLATE_NOOP("App::Property","The type of this connector")) + obj.addProperty("App::PropertyEnumeration", "ConnectorType", "PipeConnector", QT_TRANSLATE_NOOP("App::Property","The type of this connector"), locked=True) obj.ConnectorType = ["Corner","Tee"] obj.setEditorMode("ConnectorType",1) self.Type = "PipeConnector" diff --git a/src/Mod/BIM/ArchPrecast.py b/src/Mod/BIM/ArchPrecast.py index 4097c8593d..c56022f1b6 100644 --- a/src/Mod/BIM/ArchPrecast.py +++ b/src/Mod/BIM/ArchPrecast.py @@ -68,13 +68,13 @@ class _Precast(ArchComponent.Component): pl = obj.PropertiesList if not "Length" in pl: - obj.addProperty("App::PropertyDistance","Length","Structure",QT_TRANSLATE_NOOP("App::Property","The length of this element")) + obj.addProperty("App::PropertyDistance","Length","Structure",QT_TRANSLATE_NOOP("App::Property","The length of this element"), locked=True) if not "Width" in pl: - obj.addProperty("App::PropertyDistance","Width","Structure",QT_TRANSLATE_NOOP("App::Property","The width of this element")) + obj.addProperty("App::PropertyDistance","Width","Structure",QT_TRANSLATE_NOOP("App::Property","The width of this element"), locked=True) if not "Height" in pl: - obj.addProperty("App::PropertyDistance","Height","Structure",QT_TRANSLATE_NOOP("App::Property","The height of this element")) + obj.addProperty("App::PropertyDistance","Height","Structure",QT_TRANSLATE_NOOP("App::Property","The height of this element"), locked=True) if not "Nodes" in pl: - obj.addProperty("App::PropertyVectorList","Nodes","Structure",QT_TRANSLATE_NOOP("App::Property","The structural nodes of this element")) + obj.addProperty("App::PropertyVectorList","Nodes","Structure",QT_TRANSLATE_NOOP("App::Property","The structural nodes of this element"), locked=True) self.Type = "Precast" def onDocumentRestored(self,obj): @@ -102,13 +102,13 @@ class _PrecastBeam(_Precast): pl = obj.PropertiesList if not "Chamfer" in pl: - obj.addProperty("App::PropertyDistance","Chamfer","Beam",QT_TRANSLATE_NOOP("App::Property","The size of the chamfer of this element")) + obj.addProperty("App::PropertyDistance","Chamfer","Beam",QT_TRANSLATE_NOOP("App::Property","The size of the chamfer of this element"), locked=True) if not "DentLength" in pl: - obj.addProperty("App::PropertyDistance","DentLength","Beam",QT_TRANSLATE_NOOP("App::Property","The dent length of this element")) + obj.addProperty("App::PropertyDistance","DentLength","Beam",QT_TRANSLATE_NOOP("App::Property","The dent length of this element"), locked=True) if not "DentHeight" in pl: - obj.addProperty("App::PropertyDistance","DentHeight","Beam",QT_TRANSLATE_NOOP("App::Property","The dent height of this element")) + obj.addProperty("App::PropertyDistance","DentHeight","Beam",QT_TRANSLATE_NOOP("App::Property","The dent height of this element"), locked=True) if not "Dents" in pl: - obj.addProperty("App::PropertyStringList","Dents","Beam",QT_TRANSLATE_NOOP("App::Property","The dents of this element")) + obj.addProperty("App::PropertyStringList","Dents","Beam",QT_TRANSLATE_NOOP("App::Property","The dents of this element"), locked=True) def onDocumentRestored(self,obj): @@ -224,9 +224,9 @@ class _PrecastIbeam(_Precast): pl = obj.PropertiesList if not "Chamfer" in pl: - obj.addProperty("App::PropertyDistance","Chamfer","Beam",QT_TRANSLATE_NOOP("App::Property","The chamfer length of this element")) + obj.addProperty("App::PropertyDistance","Chamfer","Beam",QT_TRANSLATE_NOOP("App::Property","The chamfer length of this element"), locked=True) if not "BeamBase" in pl: - obj.addProperty("App::PropertyDistance","BeamBase","Beam",QT_TRANSLATE_NOOP("App::Property","The base length of this element")) + obj.addProperty("App::PropertyDistance","BeamBase","Beam",QT_TRANSLATE_NOOP("App::Property","The base length of this element"), locked=True) def onDocumentRestored(self,obj): @@ -290,17 +290,17 @@ class _PrecastPillar(_Precast): pl = obj.PropertiesList if not "Chamfer" in pl: - obj.addProperty("App::PropertyDistance","Chamfer","Column",QT_TRANSLATE_NOOP("App::Property","The size of the chamfer of this element")) + obj.addProperty("App::PropertyDistance","Chamfer","Column",QT_TRANSLATE_NOOP("App::Property","The size of the chamfer of this element"), locked=True) if not "GrooveDepth" in pl: - obj.addProperty("App::PropertyDistance","GrooveDepth","Column",QT_TRANSLATE_NOOP("App::Property","The groove depth of this element")) + obj.addProperty("App::PropertyDistance","GrooveDepth","Column",QT_TRANSLATE_NOOP("App::Property","The groove depth of this element"), locked=True) if not "GrooveHeight" in pl: - obj.addProperty("App::PropertyDistance","GrooveHeight","Column",QT_TRANSLATE_NOOP("App::Property","The groove height of this element")) + obj.addProperty("App::PropertyDistance","GrooveHeight","Column",QT_TRANSLATE_NOOP("App::Property","The groove height of this element"), locked=True) if not "GrooveSpacing" in pl: - obj.addProperty("App::PropertyDistance","GrooveSpacing","Column",QT_TRANSLATE_NOOP("App::Property","The spacing between the grooves of this element")) + obj.addProperty("App::PropertyDistance","GrooveSpacing","Column",QT_TRANSLATE_NOOP("App::Property","The spacing between the grooves of this element"), locked=True) if not "GrooveNumber" in pl: - obj.addProperty("App::PropertyInteger","GrooveNumber","Column",QT_TRANSLATE_NOOP("App::Property","The number of grooves of this element")) + obj.addProperty("App::PropertyInteger","GrooveNumber","Column",QT_TRANSLATE_NOOP("App::Property","The number of grooves of this element"), locked=True) if not "Dents" in pl: - obj.addProperty("App::PropertyStringList","Dents","Column",QT_TRANSLATE_NOOP("App::Property","The dents of this element")) + obj.addProperty("App::PropertyStringList","Dents","Column",QT_TRANSLATE_NOOP("App::Property","The dents of this element"), locked=True) def onDocumentRestored(self,obj): @@ -431,11 +431,11 @@ class _PrecastPanel(_Precast): pl = obj.PropertiesList if not "Chamfer" in pl: - obj.addProperty("App::PropertyDistance","Chamfer","Panel",QT_TRANSLATE_NOOP("App::Property","The size of the chamfer of this element")) + obj.addProperty("App::PropertyDistance","Chamfer","Panel",QT_TRANSLATE_NOOP("App::Property","The size of the chamfer of this element"), locked=True) if not "DentWidth" in pl: - obj.addProperty("App::PropertyDistance","DentWidth","Panel",QT_TRANSLATE_NOOP("App::Property","The dent width of this element")) + obj.addProperty("App::PropertyDistance","DentWidth","Panel",QT_TRANSLATE_NOOP("App::Property","The dent width of this element"), locked=True) if not "DentHeight" in pl: - obj.addProperty("App::PropertyDistance","DentHeight","Panel",QT_TRANSLATE_NOOP("App::Property","The dent height of this element")) + obj.addProperty("App::PropertyDistance","DentHeight","Panel",QT_TRANSLATE_NOOP("App::Property","The dent height of this element"), locked=True) def onDocumentRestored(self,obj): @@ -542,18 +542,18 @@ class _PrecastSlab(_Precast): pl = obj.PropertiesList if not "SlabType" in pl: - obj.addProperty("App::PropertyEnumeration","SlabType","Slab",QT_TRANSLATE_NOOP("App::Property","The type of this slab")) + obj.addProperty("App::PropertyEnumeration","SlabType","Slab",QT_TRANSLATE_NOOP("App::Property","The type of this slab"), locked=True) obj.SlabType = ["Champagne","Hat"] if not "SlabBase" in pl: - obj.addProperty("App::PropertyDistance","SlabBase","Slab",QT_TRANSLATE_NOOP("App::Property","The size of the base of this element")) + obj.addProperty("App::PropertyDistance","SlabBase","Slab",QT_TRANSLATE_NOOP("App::Property","The size of the base of this element"), locked=True) if not "HoleNumber" in pl: - obj.addProperty("App::PropertyInteger","HoleNumber","Slab",QT_TRANSLATE_NOOP("App::Property","The number of holes in this element")) + obj.addProperty("App::PropertyInteger","HoleNumber","Slab",QT_TRANSLATE_NOOP("App::Property","The number of holes in this element"), locked=True) if not "HoleMajor" in pl: - obj.addProperty("App::PropertyDistance","HoleMajor","Slab",QT_TRANSLATE_NOOP("App::Property","The major radius of the holes of this element")) + obj.addProperty("App::PropertyDistance","HoleMajor","Slab",QT_TRANSLATE_NOOP("App::Property","The major radius of the holes of this element"), locked=True) if not "HoleMinor" in pl: - obj.addProperty("App::PropertyDistance","HoleMinor","Slab",QT_TRANSLATE_NOOP("App::Property","The minor radius of the holes of this element")) + obj.addProperty("App::PropertyDistance","HoleMinor","Slab",QT_TRANSLATE_NOOP("App::Property","The minor radius of the holes of this element"), locked=True) if not "HoleSpacing" in pl: - obj.addProperty("App::PropertyDistance","HoleSpacing","Slab",QT_TRANSLATE_NOOP("App::Property","The spacing between the holes of this element")) + obj.addProperty("App::PropertyDistance","HoleSpacing","Slab",QT_TRANSLATE_NOOP("App::Property","The spacing between the holes of this element"), locked=True) def onDocumentRestored(self,obj): @@ -653,13 +653,13 @@ class _PrecastStairs(_Precast): pl = obj.PropertiesList if not "DownLength" in pl: - obj.addProperty("App::PropertyDistance","DownLength","Stairs",QT_TRANSLATE_NOOP("App::Property","The length of the down floor of this element")) + obj.addProperty("App::PropertyDistance","DownLength","Stairs",QT_TRANSLATE_NOOP("App::Property","The length of the down floor of this element"), locked=True) if not "RiserNumber" in pl: - obj.addProperty("App::PropertyInteger","RiserNumber","Stairs",QT_TRANSLATE_NOOP("App::Property","The number of risers in this element")) + obj.addProperty("App::PropertyInteger","RiserNumber","Stairs",QT_TRANSLATE_NOOP("App::Property","The number of risers in this element"), locked=True) if not "Riser" in pl: - obj.addProperty("App::PropertyDistance","Riser","Stairs",QT_TRANSLATE_NOOP("App::Property","The riser height of this element")) + obj.addProperty("App::PropertyDistance","Riser","Stairs",QT_TRANSLATE_NOOP("App::Property","The riser height of this element"), locked=True) if not "Tread" in pl: - obj.addProperty("App::PropertyDistance","Tread","Stairs",QT_TRANSLATE_NOOP("App::Property","The tread depth of this element")) + obj.addProperty("App::PropertyDistance","Tread","Stairs",QT_TRANSLATE_NOOP("App::Property","The tread depth of this element"), locked=True) def onDocumentRestored(self,obj): diff --git a/src/Mod/BIM/ArchProfile.py b/src/Mod/BIM/ArchProfile.py index 24700000be..6a90217d4b 100644 --- a/src/Mod/BIM/ArchProfile.py +++ b/src/Mod/BIM/ArchProfile.py @@ -126,8 +126,8 @@ class _ProfileC(_Profile): def __init__(self,obj, profile): self.cleanProperties(obj) - obj.addProperty("App::PropertyLength","OutDiameter","Draft",QT_TRANSLATE_NOOP("App::Property","Outside Diameter")).OutDiameter = profile[4] - obj.addProperty("App::PropertyLength","Thickness","Draft",QT_TRANSLATE_NOOP("App::Property","Wall thickness")).Thickness = profile[5] + obj.addProperty("App::PropertyLength","OutDiameter","Draft",QT_TRANSLATE_NOOP("App::Property","Outside Diameter"), locked=True).OutDiameter = profile[4] + obj.addProperty("App::PropertyLength","Thickness","Draft",QT_TRANSLATE_NOOP("App::Property","Wall thickness"), locked=True).Thickness = profile[5] _Profile.__init__(self,obj,profile) def execute(self,obj): @@ -151,10 +151,10 @@ class _ProfileH(_Profile): def __init__(self,obj, profile): self.cleanProperties(obj) - obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4] - obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5] - obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the web")).WebThickness = profile[6] - obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flanges")).FlangeThickness = profile[7] + obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam"), locked=True).Width = profile[4] + obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam"), locked=True).Height = profile[5] + obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the web"), locked=True).WebThickness = profile[6] + obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flanges"), locked=True).FlangeThickness = profile[7] _Profile.__init__(self,obj,profile) def execute(self,obj): @@ -185,8 +185,8 @@ class _ProfileR(_Profile): def __init__(self,obj, profile): self.cleanProperties(obj) - obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4] - obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5] + obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam"), locked=True).Width = profile[4] + obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam"), locked=True).Height = profile[5] _Profile.__init__(self,obj,profile) def execute(self,obj): @@ -209,9 +209,9 @@ class _ProfileRH(_Profile): def __init__(self,obj, profile): self.cleanProperties(obj) - obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4] - obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5] - obj.addProperty("App::PropertyLength","Thickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the sides")).Thickness = profile[6] + obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam"), locked=True).Width = profile[4] + obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam"), locked=True).Height = profile[5] + obj.addProperty("App::PropertyLength","Thickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the sides"), locked=True).Thickness = profile[6] _Profile.__init__(self,obj,profile) def execute(self,obj): @@ -242,10 +242,10 @@ class _ProfileU(_Profile): def __init__(self,obj, profile): self.cleanProperties(obj) - obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4] - obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5] - obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the webs")).WebThickness = profile[6] - obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flange")).FlangeThickness = profile[7] + obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam"), locked=True).Width = profile[4] + obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam"), locked=True).Height = profile[5] + obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the webs"), locked=True).WebThickness = profile[6] + obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flange"), locked=True).FlangeThickness = profile[7] _Profile.__init__(self,obj,profile) def execute(self,obj): @@ -272,9 +272,9 @@ class _ProfileL(_Profile): def __init__(self, obj, profile): self.cleanProperties(obj) - obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4] - obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5] - obj.addProperty("App::PropertyLength","Thickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the legs")).Thickness = profile[6] + obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam"), locked=True).Width = profile[4] + obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam"), locked=True).Height = profile[5] + obj.addProperty("App::PropertyLength","Thickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the legs"), locked=True).Thickness = profile[6] _Profile.__init__(self,obj,profile) def execute(self,obj): @@ -299,10 +299,10 @@ class _ProfileT(_Profile): def __init__(self, obj, profile): self.cleanProperties(obj) - obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam")).Width = profile[4] - obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam")).Height = profile[5] - obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the web")).WebThickness = profile[6] - obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flanges")).FlangeThickness = profile[7] + obj.addProperty("App::PropertyLength","Width","Draft",QT_TRANSLATE_NOOP("App::Property","Width of the beam"), locked=True).Width = profile[4] + obj.addProperty("App::PropertyLength","Height","Draft",QT_TRANSLATE_NOOP("App::Property","Height of the beam"), locked=True).Height = profile[5] + obj.addProperty("App::PropertyLength","WebThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the web"), locked=True).WebThickness = profile[6] + obj.addProperty("App::PropertyLength","FlangeThickness","Draft",QT_TRANSLATE_NOOP("App::Property","Thickness of the flanges"), locked=True).FlangeThickness = profile[7] _Profile.__init__(self,obj,profile) def execute(self,obj): diff --git a/src/Mod/BIM/ArchRebar.py b/src/Mod/BIM/ArchRebar.py index 8fed223079..8aa62f0e86 100644 --- a/src/Mod/BIM/ArchRebar.py +++ b/src/Mod/BIM/ArchRebar.py @@ -75,33 +75,33 @@ class _Rebar(ArchComponent.Component): pl = obj.PropertiesList if not "Diameter" in pl: - obj.addProperty("App::PropertyLength","Diameter","Rebar",QT_TRANSLATE_NOOP("App::Property","The diameter of the bar")) + obj.addProperty("App::PropertyLength","Diameter","Rebar",QT_TRANSLATE_NOOP("App::Property","The diameter of the bar"), locked=True) if not "OffsetStart" in pl: - obj.addProperty("App::PropertyDistance","OffsetStart","Rebar",QT_TRANSLATE_NOOP("App::Property","The distance between the border of the beam and the first bar (concrete cover).")) + obj.addProperty("App::PropertyDistance","OffsetStart","Rebar",QT_TRANSLATE_NOOP("App::Property","The distance between the border of the beam and the first bar (concrete cover)."), locked=True) if not "OffsetEnd" in pl: - obj.addProperty("App::PropertyDistance","OffsetEnd","Rebar",QT_TRANSLATE_NOOP("App::Property","The distance between the border of the beam and the last bar (concrete cover).")) + obj.addProperty("App::PropertyDistance","OffsetEnd","Rebar",QT_TRANSLATE_NOOP("App::Property","The distance between the border of the beam and the last bar (concrete cover)."), locked=True) if not "Amount" in pl: - obj.addProperty("App::PropertyInteger","Amount","Rebar",QT_TRANSLATE_NOOP("App::Property","The amount of bars")) + obj.addProperty("App::PropertyInteger","Amount","Rebar",QT_TRANSLATE_NOOP("App::Property","The amount of bars"), locked=True) if not "Spacing" in pl: - obj.addProperty("App::PropertyLength","Spacing","Rebar",QT_TRANSLATE_NOOP("App::Property","The spacing between the bars")) + obj.addProperty("App::PropertyLength","Spacing","Rebar",QT_TRANSLATE_NOOP("App::Property","The spacing between the bars"), locked=True) obj.setEditorMode("Spacing", 1) if not "Distance" in pl: - obj.addProperty("App::PropertyLength","Distance","Rebar",QT_TRANSLATE_NOOP("App::Property","The total distance to span the rebars over. Keep 0 to automatically use the host shape size.")) + obj.addProperty("App::PropertyLength","Distance","Rebar",QT_TRANSLATE_NOOP("App::Property","The total distance to span the rebars over. Keep 0 to automatically use the host shape size."), locked=True) if not "Direction" in pl: - obj.addProperty("App::PropertyVector","Direction","Rebar",QT_TRANSLATE_NOOP("App::Property","The direction to use to spread the bars. Keep (0,0,0) for automatic direction.")) + obj.addProperty("App::PropertyVector","Direction","Rebar",QT_TRANSLATE_NOOP("App::Property","The direction to use to spread the bars. Keep (0,0,0) for automatic direction."), locked=True) if not "Rounding" in pl: - obj.addProperty("App::PropertyFloat","Rounding","Rebar",QT_TRANSLATE_NOOP("App::Property","The fillet to apply to the angle of the base profile. This value is multiplied by the bar diameter.")) + obj.addProperty("App::PropertyFloat","Rounding","Rebar",QT_TRANSLATE_NOOP("App::Property","The fillet to apply to the angle of the base profile. This value is multiplied by the bar diameter."), locked=True) if not "PlacementList" in pl: - obj.addProperty("App::PropertyPlacementList","PlacementList","Rebar",QT_TRANSLATE_NOOP("App::Property","List of placement of all the bars")) + obj.addProperty("App::PropertyPlacementList","PlacementList","Rebar",QT_TRANSLATE_NOOP("App::Property","List of placement of all the bars"), locked=True) if not "Host" in pl: - obj.addProperty("App::PropertyLink","Host","Rebar",QT_TRANSLATE_NOOP("App::Property","The structure object that hosts this rebar")) + obj.addProperty("App::PropertyLink","Host","Rebar",QT_TRANSLATE_NOOP("App::Property","The structure object that hosts this rebar"), locked=True) if not "CustomSpacing" in pl: - obj.addProperty("App::PropertyString", "CustomSpacing", "Rebar", QT_TRANSLATE_NOOP("App::Property","The custom spacing of rebar")) + obj.addProperty("App::PropertyString", "CustomSpacing", "Rebar", QT_TRANSLATE_NOOP("App::Property","The custom spacing of rebar"), locked=True) if not "Length" in pl: - obj.addProperty("App::PropertyDistance", "Length", "Rebar", QT_TRANSLATE_NOOP("App::Property","Length of a single rebar")) + obj.addProperty("App::PropertyDistance", "Length", "Rebar", QT_TRANSLATE_NOOP("App::Property","Length of a single rebar"), locked=True) obj.setEditorMode("Length", 1) if not "TotalLength" in pl: - obj.addProperty("App::PropertyDistance", "TotalLength", "Rebar", QT_TRANSLATE_NOOP("App::Property","Total length of all rebars")) + obj.addProperty("App::PropertyDistance", "TotalLength", "Rebar", QT_TRANSLATE_NOOP("App::Property","Total length of all rebars"), locked=True) obj.setEditorMode("TotalLength", 1) if not "Mark" in pl: obj.addProperty( @@ -109,6 +109,7 @@ class _Rebar(ArchComponent.Component): "Mark", "Rebar", QT_TRANSLATE_NOOP("App::Property", "The rebar mark"), + locked=True, ) self.Type = "Rebar" @@ -404,7 +405,7 @@ class _ViewProviderRebar(ArchComponent.ViewProviderComponent): pl = vobj.PropertiesList if not "RebarShape" in pl: - vobj.addProperty("App::PropertyString","RebarShape","Rebar",QT_TRANSLATE_NOOP("App::Property","Shape of rebar")).RebarShape + vobj.addProperty("App::PropertyString","RebarShape","Rebar",QT_TRANSLATE_NOOP("App::Property","Shape of rebar"), locked=True).RebarShape vobj.setEditorMode("RebarShape",2) def onDocumentRestored(self,vobj): diff --git a/src/Mod/BIM/ArchReference.py b/src/Mod/BIM/ArchReference.py index f42f35fe21..5321081acb 100644 --- a/src/Mod/BIM/ArchReference.py +++ b/src/Mod/BIM/ArchReference.py @@ -73,13 +73,13 @@ class ArchReference: pl = obj.PropertiesList if not "File" in pl: t = QT_TRANSLATE_NOOP("App::Property","The base file this component is built upon") - obj.addProperty("App::PropertyFile","File","Reference",t) + obj.addProperty("App::PropertyFile","File","Reference",t, locked=True) if not "Part" in pl: t = QT_TRANSLATE_NOOP("App::Property","The part to use from the base file") - obj.addProperty("App::PropertyString","Part","Reference",t) + obj.addProperty("App::PropertyString","Part","Reference",t, locked=True) if not "ReferenceMode" in pl: t = QT_TRANSLATE_NOOP("App::Property","The way the referenced objects are included in the current document. 'Normal' includes the shape, 'Transient' discards the shape when the object is switched off (smaller filesize), 'Lightweight' does not import the shape but only the OpenInventor representation") - obj.addProperty("App::PropertyEnumeration","ReferenceMode","Reference",t) + obj.addProperty("App::PropertyEnumeration","ReferenceMode","Reference",t, locked=True) obj.ReferenceMode = ["Normal","Transient","Lightweight"] if "TransientReference" in pl: if obj.TransientReference: @@ -89,7 +89,7 @@ class ArchReference: FreeCAD.Console.PrintMessage(translate("Arch","Upgrading")+" "+obj.Label+" "+t+"\n") if not "FuseArch" in pl: t = QT_TRANSLATE_NOOP("App::Property","Fuse objects of same material") - obj.addProperty("App::PropertyBool","FuseArch", "Reference", t) + obj.addProperty("App::PropertyBool","FuseArch", "Reference", t, locked=True) self.Type = "Reference" @@ -526,11 +526,11 @@ class ViewProviderArchReference: pl = vobj.PropertiesList if not "TimeStamp" in pl: t = QT_TRANSLATE_NOOP("App::Property","The latest time stamp of the linked file") - vobj.addProperty("App::PropertyFloat","TimeStamp","Reference",t) + vobj.addProperty("App::PropertyFloat","TimeStamp","Reference",t, locked=True) vobj.setEditorMode("TimeStamp",2) if not "UpdateColors" in pl: t = QT_TRANSLATE_NOOP("App::Property","If true, the colors from the linked file will be kept updated") - vobj.addProperty("App::PropertyBool","UpdateColors","Reference",t) + vobj.addProperty("App::PropertyBool","UpdateColors","Reference",t, locked=True) vobj.UpdateColors = True diff --git a/src/Mod/BIM/ArchRoof.py b/src/Mod/BIM/ArchRoof.py index 65253c900c..8cc968f23c 100644 --- a/src/Mod/BIM/ArchRoof.py +++ b/src/Mod/BIM/ArchRoof.py @@ -162,59 +162,70 @@ class _Roof(ArchComponent.Component): obj.addProperty("App::PropertyFloatList", "Angles", "Roof", - QT_TRANSLATE_NOOP("App::Property", "The list of angles of the roof segments")) + QT_TRANSLATE_NOOP("App::Property", "The list of angles of the roof segments"), + locked=True) if not "Runs" in pl: obj.addProperty("App::PropertyFloatList", "Runs", "Roof", - QT_TRANSLATE_NOOP("App::Property", "The list of horizontal length projections of the roof segments")) + QT_TRANSLATE_NOOP("App::Property", "The list of horizontal length projections of the roof segments"), + locked=True) if not "IdRel" in pl: obj.addProperty("App::PropertyIntegerList", "IdRel", "Roof", - QT_TRANSLATE_NOOP("App::Property", "The list of IDs of the relative profiles of the roof segments")) + QT_TRANSLATE_NOOP("App::Property", "The list of IDs of the relative profiles of the roof segments"), + locked=True) if not "Thickness" in pl: obj.addProperty("App::PropertyFloatList", "Thickness", "Roof", - QT_TRANSLATE_NOOP("App::Property", "The list of thicknesses of the roof segments")) + QT_TRANSLATE_NOOP("App::Property", "The list of thicknesses of the roof segments"), + locked=True) if not "Overhang" in pl: obj.addProperty("App::PropertyFloatList", "Overhang", "Roof", - QT_TRANSLATE_NOOP("App::Property", "The list of overhangs of the roof segments")) + QT_TRANSLATE_NOOP("App::Property", "The list of overhangs of the roof segments"), + locked=True) if not "Heights" in pl: obj.addProperty("App::PropertyFloatList", "Heights", "Roof", - QT_TRANSLATE_NOOP("App::Property", "The list of calculated heights of the roof segments")) + QT_TRANSLATE_NOOP("App::Property", "The list of calculated heights of the roof segments"), + locked=True) if not "Face" in pl: obj.addProperty("App::PropertyInteger", "Face", "Roof", - QT_TRANSLATE_NOOP("App::Property", "The face number of the base object used to build the roof")) + QT_TRANSLATE_NOOP("App::Property", "The face number of the base object used to build the roof"), + locked=True) if not "RidgeLength" in pl: obj.addProperty("App::PropertyLength", "RidgeLength", "Roof", - QT_TRANSLATE_NOOP("App::Property", "The total length of the ridges and hips of the roof")) + QT_TRANSLATE_NOOP("App::Property", "The total length of the ridges and hips of the roof"), + locked=True) obj.setEditorMode("RidgeLength",1) if not "BorderLength" in pl: obj.addProperty("App::PropertyLength", "BorderLength", "Roof", - QT_TRANSLATE_NOOP("App::Property", "The total length of the borders of the roof")) + QT_TRANSLATE_NOOP("App::Property", "The total length of the borders of the roof"), + locked=True) obj.setEditorMode("BorderLength",1) if not "Flip" in pl: obj.addProperty("App::PropertyBool", "Flip", "Roof", - QT_TRANSLATE_NOOP("App::Property", "Specifies if the direction of the roof should be flipped")) + QT_TRANSLATE_NOOP("App::Property", "Specifies if the direction of the roof should be flipped"), + locked=True) if not "Subvolume" in pl: obj.addProperty("App::PropertyLink", "Subvolume", "Roof", - QT_TRANSLATE_NOOP("App::Property", "An optional object that defines a volume to be subtracted from walls. If field is set - it has a priority over auto-generated subvolume")) + QT_TRANSLATE_NOOP("App::Property", "An optional object that defines a volume to be subtracted from walls. If field is set - it has a priority over auto-generated subvolume"), + locked=True) self.Type = "Roof" def onDocumentRestored(self, obj): diff --git a/src/Mod/BIM/ArchSchedule.py b/src/Mod/BIM/ArchSchedule.py index ad8af9d767..d4d28ff894 100644 --- a/src/Mod/BIM/ArchSchedule.py +++ b/src/Mod/BIM/ArchSchedule.py @@ -115,21 +115,21 @@ class _ArchSchedule: def setProperties(self,obj): if not "Operation" in obj.PropertiesList: - obj.addProperty("App::PropertyStringList","Operation", "Schedule",QT_TRANSLATE_NOOP("App::Property","The operation column")) + obj.addProperty("App::PropertyStringList","Operation", "Schedule",QT_TRANSLATE_NOOP("App::Property","The operation column"), locked=True) if not "Value" in obj.PropertiesList: - obj.addProperty("App::PropertyStringList","Value", "Schedule",QT_TRANSLATE_NOOP("App::Property","The values column")) + obj.addProperty("App::PropertyStringList","Value", "Schedule",QT_TRANSLATE_NOOP("App::Property","The values column"), locked=True) if not "Unit" in obj.PropertiesList: - obj.addProperty("App::PropertyStringList","Unit", "Schedule",QT_TRANSLATE_NOOP("App::Property","The units column")) + obj.addProperty("App::PropertyStringList","Unit", "Schedule",QT_TRANSLATE_NOOP("App::Property","The units column"), locked=True) if not "Objects" in obj.PropertiesList: - obj.addProperty("App::PropertyStringList","Objects", "Schedule",QT_TRANSLATE_NOOP("App::Property","The objects column")) + obj.addProperty("App::PropertyStringList","Objects", "Schedule",QT_TRANSLATE_NOOP("App::Property","The objects column"), locked=True) if not "Filter" in obj.PropertiesList: - obj.addProperty("App::PropertyStringList","Filter", "Schedule",QT_TRANSLATE_NOOP("App::Property","The filter column")) + obj.addProperty("App::PropertyStringList","Filter", "Schedule",QT_TRANSLATE_NOOP("App::Property","The filter column"), locked=True) if not "CreateSpreadsheet" in obj.PropertiesList: - obj.addProperty("App::PropertyBool", "CreateSpreadsheet", "Schedule",QT_TRANSLATE_NOOP("App::Property","If True, a spreadsheet containing the results is recreated when needed")) + obj.addProperty("App::PropertyBool", "CreateSpreadsheet", "Schedule",QT_TRANSLATE_NOOP("App::Property","If True, a spreadsheet containing the results is recreated when needed"), locked=True) if not "DetailedResults" in obj.PropertiesList: - obj.addProperty("App::PropertyBool", "DetailedResults", "Schedule",QT_TRANSLATE_NOOP("App::Property","If True, additional lines with each individual object are added to the results")) + obj.addProperty("App::PropertyBool", "DetailedResults", "Schedule",QT_TRANSLATE_NOOP("App::Property","If True, additional lines with each individual object are added to the results"), locked=True) if not "AutoUpdate" in obj.PropertiesList: - obj.addProperty("App::PropertyBool", "AutoUpdate", "Schedule",QT_TRANSLATE_NOOP("App::Property","If True, the schedule and the associated spreadsheet are updated whenever the document is recomputed")) + obj.addProperty("App::PropertyBool", "AutoUpdate", "Schedule",QT_TRANSLATE_NOOP("App::Property","If True, the schedule and the associated spreadsheet are updated whenever the document is recomputed"), locked=True) obj.AutoUpdate = True # To add the doc observer: @@ -141,7 +141,8 @@ class _ArchSchedule: "App::PropertyLink", "Schedule", "Arch", - QT_TRANSLATE_NOOP("App::Property", "The BIM Schedule that uses this spreadsheet")) + QT_TRANSLATE_NOOP("App::Property", "The BIM Schedule that uses this spreadsheet"), + locked=True) sp.Schedule = obj def getSpreadSheet(self, obj, force=False): diff --git a/src/Mod/BIM/ArchSectionPlane.py b/src/Mod/BIM/ArchSectionPlane.py index 97dd7ce7bf..8d77f04bbd 100644 --- a/src/Mod/BIM/ArchSectionPlane.py +++ b/src/Mod/BIM/ArchSectionPlane.py @@ -817,21 +817,21 @@ class _SectionPlane: pl = obj.PropertiesList if not "Placement" in pl: - obj.addProperty("App::PropertyPlacement","Placement","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The placement of this object")) + obj.addProperty("App::PropertyPlacement","Placement","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The placement of this object"), locked=True) if not "Shape" in pl: - obj.addProperty("Part::PropertyPartShape","Shape","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The shape of this object")) + obj.addProperty("Part::PropertyPartShape","Shape","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The shape of this object"), locked=True) if not "Objects" in pl: - obj.addProperty("App::PropertyLinkList","Objects","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The objects that must be considered by this section plane. Empty means the whole document.")) + obj.addProperty("App::PropertyLinkList","Objects","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The objects that must be considered by this section plane. Empty means the whole document."), locked=True) if not "OnlySolids" in pl: - obj.addProperty("App::PropertyBool","OnlySolids","SectionPlane",QT_TRANSLATE_NOOP("App::Property","If false, non-solids will be cut too, with possible wrong results.")) + obj.addProperty("App::PropertyBool","OnlySolids","SectionPlane",QT_TRANSLATE_NOOP("App::Property","If false, non-solids will be cut too, with possible wrong results."), locked=True) obj.OnlySolids = True if not "Clip" in pl: - obj.addProperty("App::PropertyBool","Clip","SectionPlane",QT_TRANSLATE_NOOP("App::Property","If True, resulting views will be clipped to the section plane area.")) + obj.addProperty("App::PropertyBool","Clip","SectionPlane",QT_TRANSLATE_NOOP("App::Property","If True, resulting views will be clipped to the section plane area."), locked=True) if not "UseMaterialColorForFill" in pl: - obj.addProperty("App::PropertyBool","UseMaterialColorForFill","SectionPlane",QT_TRANSLATE_NOOP("App::Property","If true, the color of the objects material will be used to fill cut areas.")) + obj.addProperty("App::PropertyBool","UseMaterialColorForFill","SectionPlane",QT_TRANSLATE_NOOP("App::Property","If true, the color of the objects material will be used to fill cut areas."), locked=True) obj.UseMaterialColorForFill = False if not "Depth" in pl: - obj.addProperty("App::PropertyLength","Depth","SectionPlane",QT_TRANSLATE_NOOP("App::Property","Geometry further than this value will be cut off. Keep zero for unlimited.")) + obj.addProperty("App::PropertyLength","Depth","SectionPlane",QT_TRANSLATE_NOOP("App::Property","Geometry further than this value will be cut off. Keep zero for unlimited."), locked=True) self.Type = "SectionPlane" def onDocumentRestored(self,obj): @@ -894,43 +894,43 @@ class _ViewProviderSectionPlane: d = vobj.DisplaySize.Value vobj.removeProperty("DisplaySize") if not "DisplayLength" in pl: - vobj.addProperty("App::PropertyLength","DisplayLength","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The display length of this section plane")) + vobj.addProperty("App::PropertyLength","DisplayLength","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The display length of this section plane"), locked=True) if d: vobj.DisplayLength = d else: vobj.DisplayLength = 1000 if not "DisplayHeight" in pl: - vobj.addProperty("App::PropertyLength","DisplayHeight","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The display height of this section plane")) + vobj.addProperty("App::PropertyLength","DisplayHeight","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The display height of this section plane"), locked=True) if d: vobj.DisplayHeight = d else: vobj.DisplayHeight = 1000 if not "ArrowSize" in pl: - vobj.addProperty("App::PropertyLength","ArrowSize","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The size of the arrows of this section plane")) + vobj.addProperty("App::PropertyLength","ArrowSize","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The size of the arrows of this section plane"), locked=True) vobj.ArrowSize = 50 if not "Transparency" in pl: - vobj.addProperty("App::PropertyPercent","Transparency","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The transparency of this object")) + vobj.addProperty("App::PropertyPercent","Transparency","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The transparency of this object"), locked=True) vobj.Transparency = 85 if not "LineWidth" in pl: - vobj.addProperty("App::PropertyFloat","LineWidth","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The line width of this object")) + vobj.addProperty("App::PropertyFloat","LineWidth","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The line width of this object"), locked=True) vobj.LineWidth = 1 if not "CutDistance" in pl: - vobj.addProperty("App::PropertyLength","CutDistance","SectionPlane",QT_TRANSLATE_NOOP("App::Property","Show the cut in the 3D view")) + vobj.addProperty("App::PropertyLength","CutDistance","SectionPlane",QT_TRANSLATE_NOOP("App::Property","Show the cut in the 3D view"), locked=True) if not "LineColor" in pl: - vobj.addProperty("App::PropertyColor","LineColor","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The color of this object")) + vobj.addProperty("App::PropertyColor","LineColor","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The color of this object"), locked=True) vobj.LineColor = ArchCommands.getDefaultColor("Helpers") if not "CutView" in pl: - vobj.addProperty("App::PropertyBool","CutView","SectionPlane",QT_TRANSLATE_NOOP("App::Property","Show the cut in the 3D view")) + vobj.addProperty("App::PropertyBool","CutView","SectionPlane",QT_TRANSLATE_NOOP("App::Property","Show the cut in the 3D view"), locked=True) if not "CutMargin" in pl: - vobj.addProperty("App::PropertyLength","CutMargin","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The distance between the cut plane and the actual view cut (keep this a very small value but not zero)")) + vobj.addProperty("App::PropertyLength","CutMargin","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The distance between the cut plane and the actual view cut (keep this a very small value but not zero)"), locked=True) vobj.CutMargin = 1 if not "ShowLabel" in pl: - vobj.addProperty("App::PropertyBool","ShowLabel","SectionPlane",QT_TRANSLATE_NOOP("App::Property","Show the label in the 3D view")) + vobj.addProperty("App::PropertyBool","ShowLabel","SectionPlane",QT_TRANSLATE_NOOP("App::Property","Show the label in the 3D view"), locked=True) if not "FontName" in pl: - vobj.addProperty("App::PropertyFont","FontName", "SectionPlane",QT_TRANSLATE_NOOP("App::Property","The name of the font")) + vobj.addProperty("App::PropertyFont","FontName", "SectionPlane",QT_TRANSLATE_NOOP("App::Property","The name of the font"), locked=True) vobj.FontName = params.get_param("textfont") if not "FontSize" in pl: - vobj.addProperty("App::PropertyLength","FontSize","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The size of the text font")) + vobj.addProperty("App::PropertyLength","FontSize","SectionPlane",QT_TRANSLATE_NOOP("App::Property","The size of the text font"), locked=True) vobj.FontSize = params.get_param("textheight") * params.get_param("DefaultAnnoScaleMultiplier") diff --git a/src/Mod/BIM/ArchSite.py b/src/Mod/BIM/ArchSite.py index 4903b3929b..3adfad24fb 100644 --- a/src/Mod/BIM/ArchSite.py +++ b/src/Mod/BIM/ArchSite.py @@ -523,59 +523,59 @@ class _Site(ArchIFC.IfcProduct): pl = obj.PropertiesList if not "Terrain" in pl: - obj.addProperty("App::PropertyLink","Terrain","Site",QT_TRANSLATE_NOOP("App::Property","The base terrain of this site")) + obj.addProperty("App::PropertyLink","Terrain","Site",QT_TRANSLATE_NOOP("App::Property","The base terrain of this site"), locked=True) if not "Address" in pl: - obj.addProperty("App::PropertyString","Address","Site",QT_TRANSLATE_NOOP("App::Property","The street and house number of this site, with postal box or apartment number if needed")) + obj.addProperty("App::PropertyString","Address","Site",QT_TRANSLATE_NOOP("App::Property","The street and house number of this site, with postal box or apartment number if needed"), locked=True) if not "PostalCode" in pl: - obj.addProperty("App::PropertyString","PostalCode","Site",QT_TRANSLATE_NOOP("App::Property","The postal or zip code of this site")) + obj.addProperty("App::PropertyString","PostalCode","Site",QT_TRANSLATE_NOOP("App::Property","The postal or zip code of this site"), locked=True) if not "City" in pl: - obj.addProperty("App::PropertyString","City","Site",QT_TRANSLATE_NOOP("App::Property","The city of this site")) + obj.addProperty("App::PropertyString","City","Site",QT_TRANSLATE_NOOP("App::Property","The city of this site"), locked=True) if not "Region" in pl: - obj.addProperty("App::PropertyString","Region","Site",QT_TRANSLATE_NOOP("App::Property","The region, province or county of this site")) + obj.addProperty("App::PropertyString","Region","Site",QT_TRANSLATE_NOOP("App::Property","The region, province or county of this site"), locked=True) if not "Country" in pl: - obj.addProperty("App::PropertyString","Country","Site",QT_TRANSLATE_NOOP("App::Property","The country of this site")) + obj.addProperty("App::PropertyString","Country","Site",QT_TRANSLATE_NOOP("App::Property","The country of this site"), locked=True) if not "Latitude" in pl: - obj.addProperty("App::PropertyFloat","Latitude","Site",QT_TRANSLATE_NOOP("App::Property","The latitude of this site")) + obj.addProperty("App::PropertyFloat","Latitude","Site",QT_TRANSLATE_NOOP("App::Property","The latitude of this site"), locked=True) if not "Longitude" in pl: - obj.addProperty("App::PropertyFloat","Longitude","Site",QT_TRANSLATE_NOOP("App::Property","The latitude of this site")) + obj.addProperty("App::PropertyFloat","Longitude","Site",QT_TRANSLATE_NOOP("App::Property","The latitude of this site"), locked=True) if not "Declination" in pl: - obj.addProperty("App::PropertyAngle","Declination","Site",QT_TRANSLATE_NOOP("App::Property","Angle between the true North and the North direction in this document")) + obj.addProperty("App::PropertyAngle","Declination","Site",QT_TRANSLATE_NOOP("App::Property","Angle between the true North and the North direction in this document"), locked=True) if "NorthDeviation"in pl: obj.Declination = obj.NorthDeviation.Value obj.removeProperty("NorthDeviation") if not "Elevation" in pl: - obj.addProperty("App::PropertyLength","Elevation","Site",QT_TRANSLATE_NOOP("App::Property","The elevation of level 0 of this site")) + obj.addProperty("App::PropertyLength","Elevation","Site",QT_TRANSLATE_NOOP("App::Property","The elevation of level 0 of this site"), locked=True) if not "Url" in pl: - obj.addProperty("App::PropertyString","Url","Site",QT_TRANSLATE_NOOP("App::Property","A URL that shows this site in a mapping website")) + obj.addProperty("App::PropertyString","Url","Site",QT_TRANSLATE_NOOP("App::Property","A URL that shows this site in a mapping website"), locked=True) if not "Additions" in pl: - obj.addProperty("App::PropertyLinkList","Additions","Site",QT_TRANSLATE_NOOP("App::Property","Other shapes that are appended to this object")) + obj.addProperty("App::PropertyLinkList","Additions","Site",QT_TRANSLATE_NOOP("App::Property","Other shapes that are appended to this object"), locked=True) if not "Subtractions" in pl: - obj.addProperty("App::PropertyLinkList","Subtractions","Site",QT_TRANSLATE_NOOP("App::Property","Other shapes that are subtracted from this object")) + obj.addProperty("App::PropertyLinkList","Subtractions","Site",QT_TRANSLATE_NOOP("App::Property","Other shapes that are subtracted from this object"), locked=True) if not "ProjectedArea" in pl: - obj.addProperty("App::PropertyArea","ProjectedArea","Site",QT_TRANSLATE_NOOP("App::Property","The area of the projection of this object onto the XY plane")) + obj.addProperty("App::PropertyArea","ProjectedArea","Site",QT_TRANSLATE_NOOP("App::Property","The area of the projection of this object onto the XY plane"), locked=True) if not "Perimeter" in pl: - obj.addProperty("App::PropertyLength","Perimeter","Site",QT_TRANSLATE_NOOP("App::Property","The perimeter length of the projected area")) + obj.addProperty("App::PropertyLength","Perimeter","Site",QT_TRANSLATE_NOOP("App::Property","The perimeter length of the projected area"), locked=True) if not "AdditionVolume" in pl: - obj.addProperty("App::PropertyVolume","AdditionVolume","Site",QT_TRANSLATE_NOOP("App::Property","The volume of earth to be added to this terrain")) + obj.addProperty("App::PropertyVolume","AdditionVolume","Site",QT_TRANSLATE_NOOP("App::Property","The volume of earth to be added to this terrain"), locked=True) if not "SubtractionVolume" in pl: - obj.addProperty("App::PropertyVolume","SubtractionVolume","Site",QT_TRANSLATE_NOOP("App::Property","The volume of earth to be removed from this terrain")) + obj.addProperty("App::PropertyVolume","SubtractionVolume","Site",QT_TRANSLATE_NOOP("App::Property","The volume of earth to be removed from this terrain"), locked=True) if not "ExtrusionVector" in pl: - obj.addProperty("App::PropertyVector","ExtrusionVector","Site",QT_TRANSLATE_NOOP("App::Property","An extrusion vector to use when performing boolean operations")) + obj.addProperty("App::PropertyVector","ExtrusionVector","Site",QT_TRANSLATE_NOOP("App::Property","An extrusion vector to use when performing boolean operations"), locked=True) obj.ExtrusionVector = FreeCAD.Vector(0,0,-100000) if not "RemoveSplitter" in pl: - obj.addProperty("App::PropertyBool","RemoveSplitter","Site",QT_TRANSLATE_NOOP("App::Property","Remove splitters from the resulting shape")) + obj.addProperty("App::PropertyBool","RemoveSplitter","Site",QT_TRANSLATE_NOOP("App::Property","Remove splitters from the resulting shape"), locked=True) if not "OriginOffset" in pl: - obj.addProperty("App::PropertyVector","OriginOffset","Site",QT_TRANSLATE_NOOP("App::Property","An optional offset between the model (0,0,0) origin and the point indicated by the geocoordinates")) + obj.addProperty("App::PropertyVector","OriginOffset","Site",QT_TRANSLATE_NOOP("App::Property","An optional offset between the model (0,0,0) origin and the point indicated by the geocoordinates"), locked=True) if not hasattr(obj,"Group"): obj.addExtension("App::GroupExtensionPython") if not "IfcType" in pl: - obj.addProperty("App::PropertyEnumeration","IfcType","IFC",QT_TRANSLATE_NOOP("App::Property","The type of this object")) + obj.addProperty("App::PropertyEnumeration","IfcType","IFC",QT_TRANSLATE_NOOP("App::Property","The type of this object"), locked=True) obj.IfcType = ArchIFC.IfcTypes obj.IcfType = "Site" if not "TimeZone" in pl: - obj.addProperty("App::PropertyInteger","TimeZone","Site",QT_TRANSLATE_NOOP("App::Property","The time zone where this site is located")) + obj.addProperty("App::PropertyInteger","TimeZone","Site",QT_TRANSLATE_NOOP("App::Property","The time zone where this site is located"), locked=True) if not "EPWFile" in pl: - obj.addProperty("App::PropertyFileIncluded","EPWFile","Site",QT_TRANSLATE_NOOP("App::Property","An optional EPW File for the location of this site. Refer to the Site documentation to know how to obtain one")) + obj.addProperty("App::PropertyFileIncluded","EPWFile","Site",QT_TRANSLATE_NOOP("App::Property","An optional EPW File for the location of this site. Refer to the Site documentation to know how to obtain one"), locked=True) self.Type = "Site" def onDocumentRestored(self,obj): @@ -779,30 +779,30 @@ class _ViewProviderSite: pl = vobj.PropertiesList if not "WindRose" in pl: - vobj.addProperty("App::PropertyBool","WindRose","Site",QT_TRANSLATE_NOOP("App::Property","Show wind rose diagram or not. Uses solar diagram scale. Needs Ladybug module")) + vobj.addProperty("App::PropertyBool","WindRose","Site",QT_TRANSLATE_NOOP("App::Property","Show wind rose diagram or not. Uses solar diagram scale. Needs Ladybug module"), locked=True) if not "SolarDiagram" in pl: - vobj.addProperty("App::PropertyBool","SolarDiagram","Site",QT_TRANSLATE_NOOP("App::Property","Show solar diagram or not")) + vobj.addProperty("App::PropertyBool","SolarDiagram","Site",QT_TRANSLATE_NOOP("App::Property","Show solar diagram or not"), locked=True) if not "SolarDiagramScale" in pl: - vobj.addProperty("App::PropertyFloat","SolarDiagramScale","Site",QT_TRANSLATE_NOOP("App::Property","The scale of the solar diagram")) + vobj.addProperty("App::PropertyFloat","SolarDiagramScale","Site",QT_TRANSLATE_NOOP("App::Property","The scale of the solar diagram"), locked=True) vobj.SolarDiagramScale = 1 if not "SolarDiagramPosition" in pl: - vobj.addProperty("App::PropertyVector","SolarDiagramPosition","Site",QT_TRANSLATE_NOOP("App::Property","The position of the solar diagram")) + vobj.addProperty("App::PropertyVector","SolarDiagramPosition","Site",QT_TRANSLATE_NOOP("App::Property","The position of the solar diagram"), locked=True) if not "SolarDiagramColor" in pl: - vobj.addProperty("App::PropertyColor","SolarDiagramColor","Site",QT_TRANSLATE_NOOP("App::Property","The color of the solar diagram")) + vobj.addProperty("App::PropertyColor","SolarDiagramColor","Site",QT_TRANSLATE_NOOP("App::Property","The color of the solar diagram"), locked=True) vobj.SolarDiagramColor = (0.16,0.16,0.25) if not "Orientation" in pl: vobj.addProperty("App::PropertyEnumeration", "Orientation", "Site", QT_TRANSLATE_NOOP( - "App::Property", "When set to 'True North' the whole geometry will be rotated to match the true north of this site")) + "App::Property", "When set to 'True North' the whole geometry will be rotated to match the true north of this site"), locked=True) vobj.Orientation = ["Project North", "True North"] vobj.Orientation = "Project North" if not "Compass" in pl: - vobj.addProperty("App::PropertyBool", "Compass", "Compass", QT_TRANSLATE_NOOP("App::Property", "Show compass or not")) + vobj.addProperty("App::PropertyBool", "Compass", "Compass", QT_TRANSLATE_NOOP("App::Property", "Show compass or not"), locked=True) if not "CompassRotation" in pl: - vobj.addProperty("App::PropertyAngle", "CompassRotation", "Compass", QT_TRANSLATE_NOOP("App::Property", "The rotation of the Compass relative to the Site")) + vobj.addProperty("App::PropertyAngle", "CompassRotation", "Compass", QT_TRANSLATE_NOOP("App::Property", "The rotation of the Compass relative to the Site"), locked=True) if not "CompassPosition" in pl: - vobj.addProperty("App::PropertyVector", "CompassPosition", "Compass", QT_TRANSLATE_NOOP("App::Property", "The position of the Compass relative to the Site placement")) + vobj.addProperty("App::PropertyVector", "CompassPosition", "Compass", QT_TRANSLATE_NOOP("App::Property", "The position of the Compass relative to the Site placement"), locked=True) if not "UpdateDeclination" in pl: - vobj.addProperty("App::PropertyBool", "UpdateDeclination", "Compass", QT_TRANSLATE_NOOP("App::Property", "Update the Declination value based on the compass rotation")) + vobj.addProperty("App::PropertyBool", "UpdateDeclination", "Compass", QT_TRANSLATE_NOOP("App::Property", "Update the Declination value based on the compass rotation"), locked=True) def getIcon(self): """Return the path to the appropriate icon. diff --git a/src/Mod/BIM/ArchSketchObject.py b/src/Mod/BIM/ArchSketchObject.py index 71f2c27fed..71ace8352b 100644 --- a/src/Mod/BIM/ArchSketchObject.py +++ b/src/Mod/BIM/ArchSketchObject.py @@ -45,7 +45,7 @@ class ArchSketch(ArchSketchObject): if "Hosts" not in prop: fp.addProperty("App::PropertyLinkList","Hosts","Window", QT_TRANSLATE_NOOP("App::Property", - "The objects that host this window")) + "The objects that host this window"), locked=True) # Arch Window's code #from ArchSketchObjectExt import ArchSketch # Doesn't work diff --git a/src/Mod/BIM/ArchSpace.py b/src/Mod/BIM/ArchSpace.py index e7ad822d8a..8805e12202 100644 --- a/src/Mod/BIM/ArchSpace.py +++ b/src/Mod/BIM/ArchSpace.py @@ -198,38 +198,38 @@ class _Space(ArchComponent.Component): pl = obj.PropertiesList if not "Boundaries" in pl: - obj.addProperty("App::PropertyLinkSubList","Boundaries", "Space",QT_TRANSLATE_NOOP("App::Property","The objects that make the boundaries of this space object")) + obj.addProperty("App::PropertyLinkSubList","Boundaries", "Space",QT_TRANSLATE_NOOP("App::Property","The objects that make the boundaries of this space object"), locked=True) if not "Area" in pl: - obj.addProperty("App::PropertyArea", "Area", "Space",QT_TRANSLATE_NOOP("App::Property","Identical to Horizontal Area")) + obj.addProperty("App::PropertyArea", "Area", "Space",QT_TRANSLATE_NOOP("App::Property","Identical to Horizontal Area"), locked=True) if not "FinishFloor" in pl: - obj.addProperty("App::PropertyString", "FinishFloor", "Space",QT_TRANSLATE_NOOP("App::Property","The finishing of the floor of this space")) + obj.addProperty("App::PropertyString", "FinishFloor", "Space",QT_TRANSLATE_NOOP("App::Property","The finishing of the floor of this space"), locked=True) if not "FinishWalls" in pl: - obj.addProperty("App::PropertyString", "FinishWalls", "Space",QT_TRANSLATE_NOOP("App::Property","The finishing of the walls of this space")) + obj.addProperty("App::PropertyString", "FinishWalls", "Space",QT_TRANSLATE_NOOP("App::Property","The finishing of the walls of this space"), locked=True) if not "FinishCeiling" in pl: - obj.addProperty("App::PropertyString", "FinishCeiling", "Space",QT_TRANSLATE_NOOP("App::Property","The finishing of the ceiling of this space")) + obj.addProperty("App::PropertyString", "FinishCeiling", "Space",QT_TRANSLATE_NOOP("App::Property","The finishing of the ceiling of this space"), locked=True) if not "Group" in pl: - obj.addProperty("App::PropertyLinkList", "Group", "Space",QT_TRANSLATE_NOOP("App::Property","Objects that are included inside this space, such as furniture")) + obj.addProperty("App::PropertyLinkList", "Group", "Space",QT_TRANSLATE_NOOP("App::Property","Objects that are included inside this space, such as furniture"), locked=True) if not "SpaceType" in pl: - obj.addProperty("App::PropertyEnumeration","SpaceType", "Space",QT_TRANSLATE_NOOP("App::Property","The type of this space")) + obj.addProperty("App::PropertyEnumeration","SpaceType", "Space",QT_TRANSLATE_NOOP("App::Property","The type of this space"), locked=True) obj.SpaceType = SpaceTypes if not "FloorThickness" in pl: - obj.addProperty("App::PropertyLength", "FloorThickness","Space",QT_TRANSLATE_NOOP("App::Property","The thickness of the floor finish")) + obj.addProperty("App::PropertyLength", "FloorThickness","Space",QT_TRANSLATE_NOOP("App::Property","The thickness of the floor finish"), locked=True) if not "NumberOfPeople" in pl: - obj.addProperty("App::PropertyInteger", "NumberOfPeople","Space",QT_TRANSLATE_NOOP("App::Property","The number of people who typically occupy this space")) + obj.addProperty("App::PropertyInteger", "NumberOfPeople","Space",QT_TRANSLATE_NOOP("App::Property","The number of people who typically occupy this space"), locked=True) if not "LightingPower" in pl: - obj.addProperty("App::PropertyFloat", "LightingPower", "Space",QT_TRANSLATE_NOOP("App::Property","The electric power needed to light this space in Watts")) + obj.addProperty("App::PropertyFloat", "LightingPower", "Space",QT_TRANSLATE_NOOP("App::Property","The electric power needed to light this space in Watts"), locked=True) if not "EquipmentPower" in pl: - obj.addProperty("App::PropertyFloat", "EquipmentPower","Space",QT_TRANSLATE_NOOP("App::Property","The electric power needed by the equipment of this space in Watts")) + obj.addProperty("App::PropertyFloat", "EquipmentPower","Space",QT_TRANSLATE_NOOP("App::Property","The electric power needed by the equipment of this space in Watts"), locked=True) if not "AutoPower" in pl: - obj.addProperty("App::PropertyBool", "AutoPower", "Space",QT_TRANSLATE_NOOP("App::Property","If True, Equipment Power will be automatically filled by the equipment included in this space")) + obj.addProperty("App::PropertyBool", "AutoPower", "Space",QT_TRANSLATE_NOOP("App::Property","If True, Equipment Power will be automatically filled by the equipment included in this space"), locked=True) if not "Conditioning" in pl: - obj.addProperty("App::PropertyEnumeration","Conditioning", "Space",QT_TRANSLATE_NOOP("App::Property","The type of air conditioning of this space")) + obj.addProperty("App::PropertyEnumeration","Conditioning", "Space",QT_TRANSLATE_NOOP("App::Property","The type of air conditioning of this space"), locked=True) obj.Conditioning = ConditioningTypes if not "Internal" in pl: - obj.addProperty("App::PropertyBool", "Internal", "Space",QT_TRANSLATE_NOOP("App::Property","Specifies if this space is internal or external")) + obj.addProperty("App::PropertyBool", "Internal", "Space",QT_TRANSLATE_NOOP("App::Property","Specifies if this space is internal or external"), locked=True) obj.Internal = True if not "AreaCalculationType" in pl: - obj.addProperty("App::PropertyEnumeration", "AreaCalculationType", "Space",QT_TRANSLATE_NOOP("App::Property","Defines the calculation type for the horizontal area and its perimeter length")) + obj.addProperty("App::PropertyEnumeration", "AreaCalculationType", "Space",QT_TRANSLATE_NOOP("App::Property","Defines the calculation type for the horizontal area and its perimeter length"), locked=True) obj.AreaCalculationType = AreaCalculationType self.Type = "Space" @@ -445,34 +445,34 @@ class _ViewProviderSpace(ArchComponent.ViewProviderComponent): pl = vobj.PropertiesList if not "Text" in pl: - vobj.addProperty("App::PropertyStringList", "Text", "Space",QT_TRANSLATE_NOOP("App::Property","The text to show. Use $area, $label, $longname, $description or any other property name preceded with $ (case insensitive), or $floor, $walls, $ceiling for finishes, to insert the respective data")) + vobj.addProperty("App::PropertyStringList", "Text", "Space",QT_TRANSLATE_NOOP("App::Property","The text to show. Use $area, $label, $longname, $description or any other property name preceded with $ (case insensitive), or $floor, $walls, $ceiling for finishes, to insert the respective data"), locked=True) vobj.Text = ["$label","$area"] if not "FontName" in pl: - vobj.addProperty("App::PropertyFont", "FontName", "Space",QT_TRANSLATE_NOOP("App::Property","The name of the font")) + vobj.addProperty("App::PropertyFont", "FontName", "Space",QT_TRANSLATE_NOOP("App::Property","The name of the font"), locked=True) vobj.FontName = params.get_param("textfont") if not "TextColor" in pl: - vobj.addProperty("App::PropertyColor", "TextColor", "Space",QT_TRANSLATE_NOOP("App::Property","The color of the area text")) + vobj.addProperty("App::PropertyColor", "TextColor", "Space",QT_TRANSLATE_NOOP("App::Property","The color of the area text"), locked=True) vobj.TextColor = (0.0,0.0,0.0,1.0) if not "FontSize" in pl: - vobj.addProperty("App::PropertyLength", "FontSize", "Space",QT_TRANSLATE_NOOP("App::Property","The size of the text font")) + vobj.addProperty("App::PropertyLength", "FontSize", "Space",QT_TRANSLATE_NOOP("App::Property","The size of the text font"), locked=True) vobj.FontSize = params.get_param("textheight") * params.get_param("DefaultAnnoScaleMultiplier") if not "FirstLine" in pl: - vobj.addProperty("App::PropertyLength", "FirstLine", "Space",QT_TRANSLATE_NOOP("App::Property","The size of the first line of text")) + vobj.addProperty("App::PropertyLength", "FirstLine", "Space",QT_TRANSLATE_NOOP("App::Property","The size of the first line of text"), locked=True) vobj.FirstLine = params.get_param("textheight") * params.get_param("DefaultAnnoScaleMultiplier") if not "LineSpacing" in pl: - vobj.addProperty("App::PropertyFloat", "LineSpacing", "Space",QT_TRANSLATE_NOOP("App::Property","The space between the lines of text")) + vobj.addProperty("App::PropertyFloat", "LineSpacing", "Space",QT_TRANSLATE_NOOP("App::Property","The space between the lines of text"), locked=True) vobj.LineSpacing = 1.0 if not "TextPosition" in pl: - vobj.addProperty("App::PropertyVectorDistance","TextPosition","Space",QT_TRANSLATE_NOOP("App::Property","The position of the text. Leave (0,0,0) for automatic position")) + vobj.addProperty("App::PropertyVectorDistance","TextPosition","Space",QT_TRANSLATE_NOOP("App::Property","The position of the text. Leave (0,0,0) for automatic position"), locked=True) if not "TextAlign" in pl: - vobj.addProperty("App::PropertyEnumeration", "TextAlign", "Space",QT_TRANSLATE_NOOP("App::Property","The justification of the text")) + vobj.addProperty("App::PropertyEnumeration", "TextAlign", "Space",QT_TRANSLATE_NOOP("App::Property","The justification of the text"), locked=True) vobj.TextAlign = ["Left","Center","Right"] vobj.TextAlign = "Center" if not "Decimals" in pl: - vobj.addProperty("App::PropertyInteger", "Decimals", "Space",QT_TRANSLATE_NOOP("App::Property","The number of decimals to use for calculated texts")) + vobj.addProperty("App::PropertyInteger", "Decimals", "Space",QT_TRANSLATE_NOOP("App::Property","The number of decimals to use for calculated texts"), locked=True) vobj.Decimals = params.get_param("dimPrecision") if not "ShowUnit" in pl: - vobj.addProperty("App::PropertyBool", "ShowUnit", "Space",QT_TRANSLATE_NOOP("App::Property","Show the unit suffix")) + vobj.addProperty("App::PropertyBool", "ShowUnit", "Space",QT_TRANSLATE_NOOP("App::Property","Show the unit suffix"), locked=True) vobj.ShowUnit = params.get_param("showUnit") def onDocumentRestored(self,vobj): diff --git a/src/Mod/BIM/ArchStairs.py b/src/Mod/BIM/ArchStairs.py index 0ebd2bc0c8..e9185204fd 100644 --- a/src/Mod/BIM/ArchStairs.py +++ b/src/Mod/BIM/ArchStairs.py @@ -78,71 +78,71 @@ class _Stairs(ArchComponent.Component): # base properties if not "Length" in pl: - obj.addProperty("App::PropertyLength","Length","Stairs",QT_TRANSLATE_NOOP("App::Property","The length of these stairs, if no baseline is defined")) + obj.addProperty("App::PropertyLength","Length","Stairs",QT_TRANSLATE_NOOP("App::Property","The length of these stairs, if no baseline is defined"), locked=True) if not "Width" in pl: - obj.addProperty("App::PropertyLength","Width","Stairs",QT_TRANSLATE_NOOP("App::Property","The width of these stairs")) + obj.addProperty("App::PropertyLength","Width","Stairs",QT_TRANSLATE_NOOP("App::Property","The width of these stairs"), locked=True) if not "Height" in pl: - obj.addProperty("App::PropertyLength","Height","Stairs",QT_TRANSLATE_NOOP("App::Property","The total height of these stairs")) + obj.addProperty("App::PropertyLength","Height","Stairs",QT_TRANSLATE_NOOP("App::Property","The total height of these stairs"), locked=True) if not "Align" in pl: - obj.addProperty("App::PropertyEnumeration","Align","Stairs",QT_TRANSLATE_NOOP("App::Property","The alignment of these stairs on their baseline, if applicable")) + obj.addProperty("App::PropertyEnumeration","Align","Stairs",QT_TRANSLATE_NOOP("App::Property","The alignment of these stairs on their baseline, if applicable"), locked=True) obj.Align = ['Left','Right','Center'] # TODO - To be combined into Width when PropertyLengthList is available if not "WidthOfLanding" in pl: - obj.addProperty("App::PropertyFloatList","WidthOfLanding","Stairs",QT_TRANSLATE_NOOP("App::Property","The width of a Landing (Second edge and after - First edge follows Width property)")) + obj.addProperty("App::PropertyFloatList","WidthOfLanding","Stairs",QT_TRANSLATE_NOOP("App::Property","The width of a Landing (Second edge and after - First edge follows Width property)"), locked=True) # steps and risers properties if not "NumberOfSteps" in pl: - obj.addProperty("App::PropertyInteger","NumberOfSteps","Steps",QT_TRANSLATE_NOOP("App::Property","The number of risers in these stairs")) + obj.addProperty("App::PropertyInteger","NumberOfSteps","Steps",QT_TRANSLATE_NOOP("App::Property","The number of risers in these stairs"), locked=True) if not "TreadDepth" in pl: - obj.addProperty("App::PropertyLength","TreadDepth","Steps",QT_TRANSLATE_NOOP("App::Property","The depth of the treads of these stairs")) + obj.addProperty("App::PropertyLength","TreadDepth","Steps",QT_TRANSLATE_NOOP("App::Property","The depth of the treads of these stairs"), locked=True) obj.setEditorMode("TreadDepth",1) if not "RiserHeight" in pl: - obj.addProperty("App::PropertyLength","RiserHeight","Steps",QT_TRANSLATE_NOOP("App::Property","The height of the risers of these stairs")) + obj.addProperty("App::PropertyLength","RiserHeight","Steps",QT_TRANSLATE_NOOP("App::Property","The height of the risers of these stairs"), locked=True) obj.setEditorMode("RiserHeight",1) if not "Nosing" in pl: - obj.addProperty("App::PropertyLength","Nosing","Steps",QT_TRANSLATE_NOOP("App::Property","The size of the nosing")) + obj.addProperty("App::PropertyLength","Nosing","Steps",QT_TRANSLATE_NOOP("App::Property","The size of the nosing"), locked=True) if not "TreadThickness" in pl: - obj.addProperty("App::PropertyLength","TreadThickness","Steps",QT_TRANSLATE_NOOP("App::Property","The thickness of the treads")) + obj.addProperty("App::PropertyLength","TreadThickness","Steps",QT_TRANSLATE_NOOP("App::Property","The thickness of the treads"), locked=True) if not "BlondelRatio" in pl: - obj.addProperty("App::PropertyFloat","BlondelRatio","Steps",QT_TRANSLATE_NOOP("App::Property","The Blondel ratio indicates comfortable stairs and should be between 62 and 64cm or 24.5 and 25.5in")) + obj.addProperty("App::PropertyFloat","BlondelRatio","Steps",QT_TRANSLATE_NOOP("App::Property","The Blondel ratio indicates comfortable stairs and should be between 62 and 64cm or 24.5 and 25.5in"), locked=True) obj.setEditorMode("BlondelRatio",1) if not "RiserThickness" in pl: - obj.addProperty("App::PropertyLength","RiserThickness","Steps",QT_TRANSLATE_NOOP("App::Property","The thickness of the risers")) + obj.addProperty("App::PropertyLength","RiserThickness","Steps",QT_TRANSLATE_NOOP("App::Property","The thickness of the risers"), locked=True) if not hasattr(obj,"LandingDepth"): - obj.addProperty("App::PropertyLength","LandingDepth","Steps",QT_TRANSLATE_NOOP("App::Property","The depth of the landing of these stairs")) + obj.addProperty("App::PropertyLength","LandingDepth","Steps",QT_TRANSLATE_NOOP("App::Property","The depth of the landing of these stairs"), locked=True) if not hasattr(obj,"TreadDepthEnforce"): - obj.addProperty("App::PropertyLength","TreadDepthEnforce","Steps",QT_TRANSLATE_NOOP("App::Property","The depth of the treads of these stairs - Enforced regardless of Length or edge's Length")) + obj.addProperty("App::PropertyLength","TreadDepthEnforce","Steps",QT_TRANSLATE_NOOP("App::Property","The depth of the treads of these stairs - Enforced regardless of Length or edge's Length"), locked=True) if not hasattr(obj,"RiserHeightEnforce"): - obj.addProperty("App::PropertyLength","RiserHeightEnforce","Steps",QT_TRANSLATE_NOOP("App::Property","The height of the risers of these stairs - Enforced regardless of Height or edge's Height")) + obj.addProperty("App::PropertyLength","RiserHeightEnforce","Steps",QT_TRANSLATE_NOOP("App::Property","The height of the risers of these stairs - Enforced regardless of Height or edge's Height"), locked=True) if not hasattr(obj,"Flight"): - obj.addProperty("App::PropertyEnumeration","Flight","Structure",QT_TRANSLATE_NOOP("App::Property","The direction of flight after landing")) + obj.addProperty("App::PropertyEnumeration","Flight","Structure",QT_TRANSLATE_NOOP("App::Property","The direction of flight after landing"), locked=True) obj.Flight = ["Straight","HalfTurnLeft","HalfTurnRight"] # Segment and Parts properties if not hasattr(obj,"LastSegment"): - obj.addProperty("App::PropertyLink","LastSegment","Segment and Parts","Last Segment (Flight or Landing) of Arch Stairs connecting to This Segment") + obj.addProperty("App::PropertyLink","LastSegment","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","Last Segment (Flight or Landing) of Arch Stairs connecting to This Segment"), locked=True) if not hasattr(obj,"AbsTop"): - obj.addProperty("App::PropertyVector","AbsTop","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'absolute' top level of a flight of stairs leads to")) + obj.addProperty("App::PropertyVector","AbsTop","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'absolute' top level of a flight of stairs leads to"), locked=True) obj.setEditorMode("AbsTop",1) if not hasattr(obj,"OutlineLeft"): - obj.addProperty("App::PropertyVectorList","OutlineLeft","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of stairs")) # Used for Outline of Railing + obj.addProperty("App::PropertyVectorList","OutlineLeft","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of stairs"), locked=True) # Used for Outline of Railing obj.setEditorMode("OutlineLeft",1) if not hasattr(obj,"OutlineRight"): - obj.addProperty("App::PropertyVectorList","OutlineRight","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of stairs")) + obj.addProperty("App::PropertyVectorList","OutlineRight","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of stairs"), locked=True) obj.setEditorMode("OutlineRight",1) # Can't accept 'None' in list, need NaN #if not hasattr(obj,"OutlineRailArcLeft"): - #obj.addProperty("App::PropertyVectorList","OutlineRailArcLeft","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' 'arc points' of stairs railing")) + #obj.addProperty("App::PropertyVectorList","OutlineRailArcLeft","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' 'arc points' of stairs railing"), locked=True) #obj.setEditorMode("OutlineRailArcLeft",1) #if not hasattr(obj,"OutlineRailArcRight"): - #obj.addProperty("App::PropertyVectorList","OutlineRailArcRight","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'right outline' 'arc points of stairs railing")) + #obj.addProperty("App::PropertyVectorList","OutlineRailArcRight","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'right outline' 'arc points of stairs railing"), locked=True) #obj.setEditorMode("OutlineRailArcRight",1) if not hasattr(self,"OutlineRailArcLeft"): self.OutlineRailArcLeft = [] @@ -150,23 +150,23 @@ class _Stairs(ArchComponent.Component): self.OutlineRailArcRight = [] if not hasattr(obj,"RailingLeft"): - obj.addProperty("App::PropertyLinkHidden","RailingLeft","Segment and Parts","Name of Railing object (left) created") + obj.addProperty("App::PropertyLinkHidden","RailingLeft","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","Name of Railing object (left) created"), locked=True) if not hasattr(obj,"RailingRight"): - obj.addProperty("App::PropertyLinkHidden","RailingRight","Segment and Parts","Name of Railing object (right) created") + obj.addProperty("App::PropertyLinkHidden","RailingRight","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","Name of Railing object (right) created"), locked=True) if not hasattr(obj,"OutlineLeftAll"): - obj.addProperty("App::PropertyVectorList","OutlineLeftAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of all segments of stairs")) + obj.addProperty("App::PropertyVectorList","OutlineLeftAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' of all segments of stairs"), locked=True) obj.setEditorMode("OutlineLeftAll",1) # Used for Outline of Railing if not hasattr(obj,"OutlineRightAll"): - obj.addProperty("App::PropertyVectorList","OutlineRightAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'right outline' of all segments of stairs")) + obj.addProperty("App::PropertyVectorList","OutlineRightAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'right outline' of all segments of stairs"), locked=True) obj.setEditorMode("OutlineRightAll",1) # Can't accept 'None' in list, need NaN #if not hasattr(obj,"OutlineRailArcLeftAll"): - #obj.addProperty("App::PropertyVectorList","OutlineRailArcLeftAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' 'arc points' of all segments of stairs railing")) + #obj.addProperty("App::PropertyVectorList","OutlineRailArcLeftAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'left outline' 'arc points' of all segments of stairs railing"), locked=True) #obj.setEditorMode("OutlineRailArcLeftAll",1) # Used for Outline of Railing #if not hasattr(obj,"OutlineRailArcRightAll"): - #obj.addProperty("App::PropertyVectorList","OutlineRailArcRightAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'right outline' 'arc points' of all segments of stairs railing")) + #obj.addProperty("App::PropertyVectorList","OutlineRailArcRightAll","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","The 'right outline' 'arc points' of all segments of stairs railing"), locked=True) #obj.setEditorMode("OutlineRailArcRightAll",1) if not hasattr(self,"OutlineRailArcLeftAll"): self.OutlineRailArcLeftAll = [] @@ -174,41 +174,41 @@ class _Stairs(ArchComponent.Component): self.OutlineRailArcRightAll = [] if not hasattr(obj,"RailingHeightLeft"): - obj.addProperty("App::PropertyLength","RailingHeightLeft","Segment and Parts","Height of Railing on Left hand side from Stairs or Landing ") + obj.addProperty("App::PropertyLength","RailingHeightLeft","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","Height of Railing on Left hand side from Stairs or Landing"), locked=True) if not hasattr(obj,"RailingHeightRight"): - obj.addProperty("App::PropertyLength","RailingHeightRight","Segment and Parts","Height of Railing on Right hand side from Stairs or Landing ") + obj.addProperty("App::PropertyLength","RailingHeightRight","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","Height of Railing on Right hand side from Stairs or Landing "), locked=True) if not hasattr(obj,"RailingOffsetLeft"): - obj.addProperty("App::PropertyLength","RailingOffsetLeft","Segment and Parts","Offset of Railing on Left hand side from stairs or landing Edge ") + obj.addProperty("App::PropertyLength","RailingOffsetLeft","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","Offset of Railing on Left hand side from stairs or landing Edge "), locked=True) if not hasattr(obj,"RailingOffsetRight"): - obj.addProperty("App::PropertyLength","RailingOffsetRight","Segment and Parts","Offset of Railing on Right hand side from stairs or landing Edge ") + obj.addProperty("App::PropertyLength","RailingOffsetRight","Segment and Parts",QT_TRANSLATE_NOOP("App::Property","Offset of Railing on Right hand side from stairs or landing Edge "), locked=True) # structural properties if not "Landings" in pl: - obj.addProperty("App::PropertyEnumeration","Landings","Structure",QT_TRANSLATE_NOOP("App::Property","The type of landings of these stairs")) + obj.addProperty("App::PropertyEnumeration","Landings","Structure",QT_TRANSLATE_NOOP("App::Property","The type of landings of these stairs"), locked=True) obj.Landings = ["None","At center","At each corner"] if not "Winders" in pl: - obj.addProperty("App::PropertyEnumeration","Winders","Structure",QT_TRANSLATE_NOOP("App::Property","The type of winders in these stairs")) + obj.addProperty("App::PropertyEnumeration","Winders","Structure",QT_TRANSLATE_NOOP("App::Property","The type of winders in these stairs"), locked=True) obj.Winders = ["None","All","Corners strict","Corners relaxed"] if not "Structure" in pl: - obj.addProperty("App::PropertyEnumeration","Structure","Structure",QT_TRANSLATE_NOOP("App::Property","The type of structure of these stairs")) + obj.addProperty("App::PropertyEnumeration","Structure","Structure",QT_TRANSLATE_NOOP("App::Property","The type of structure of these stairs"), locked=True) obj.Structure = ["None","Massive","One stringer","Two stringers"] if not "StructureThickness" in pl: - obj.addProperty("App::PropertyLength","StructureThickness","Structure",QT_TRANSLATE_NOOP("App::Property","The thickness of the massive structure or of the stringers")) + obj.addProperty("App::PropertyLength","StructureThickness","Structure",QT_TRANSLATE_NOOP("App::Property","The thickness of the massive structure or of the stringers"), locked=True) if not "StringerWidth" in pl: - obj.addProperty("App::PropertyLength","StringerWidth","Structure",QT_TRANSLATE_NOOP("App::Property","The width of the stringers")) + obj.addProperty("App::PropertyLength","StringerWidth","Structure",QT_TRANSLATE_NOOP("App::Property","The width of the stringers"), locked=True) if not "StructureOffset" in pl: - obj.addProperty("App::PropertyLength","StructureOffset","Structure",QT_TRANSLATE_NOOP("App::Property","The offset between the border of the stairs and the structure")) + obj.addProperty("App::PropertyLength","StructureOffset","Structure",QT_TRANSLATE_NOOP("App::Property","The offset between the border of the stairs and the structure"), locked=True) if not "StringerOverlap" in pl: - obj.addProperty("App::PropertyLength","StringerOverlap","Structure",QT_TRANSLATE_NOOP("App::Property","The overlap of the stringers above the bottom of the treads")) + obj.addProperty("App::PropertyLength","StringerOverlap","Structure",QT_TRANSLATE_NOOP("App::Property","The overlap of the stringers above the bottom of the treads"), locked=True) if not "DownSlabThickness" in pl: - obj.addProperty("App::PropertyLength","DownSlabThickness","Structure",QT_TRANSLATE_NOOP("App::Property","The thickness of the lower floor slab")) + obj.addProperty("App::PropertyLength","DownSlabThickness","Structure",QT_TRANSLATE_NOOP("App::Property","The thickness of the lower floor slab"), locked=True) if not "UpSlabThickness" in pl: - obj.addProperty("App::PropertyLength","UpSlabThickness","Structure",QT_TRANSLATE_NOOP("App::Property","The thickness of the upper floor slab")) + obj.addProperty("App::PropertyLength","UpSlabThickness","Structure",QT_TRANSLATE_NOOP("App::Property","The thickness of the upper floor slab"), locked=True) if not "ConnectionDownStartStairs" in pl: - obj.addProperty("App::PropertyEnumeration","ConnectionDownStartStairs","Structure",QT_TRANSLATE_NOOP("App::Property","The type of connection between the lower floor slab and the start of the stairs")) + obj.addProperty("App::PropertyEnumeration","ConnectionDownStartStairs","Structure",QT_TRANSLATE_NOOP("App::Property","The type of connection between the lower floor slab and the start of the stairs"), locked=True) obj.ConnectionDownStartStairs = ["HorizontalCut","VerticalCut","HorizontalVerticalCut"] if not "ConnectionEndStairsUp" in pl: - obj.addProperty("App::PropertyEnumeration","ConnectionEndStairsUp","Structure",QT_TRANSLATE_NOOP("App::Property","The type of connection between the end of the stairs and the upper floor slab")) + obj.addProperty("App::PropertyEnumeration","ConnectionEndStairsUp","Structure",QT_TRANSLATE_NOOP("App::Property","The type of connection between the end of the stairs and the upper floor slab"), locked=True) obj.ConnectionEndStairsUp = ["toFlightThickness","toSlabThickness"] # additional stairs properties @@ -1118,7 +1118,7 @@ class _Stairs(ArchComponent.Component): # TODO # Upgrade obj if it is from an older version of FreeCAD if not hasattr(obj, "StringerOverlap"): - obj.addProperty("App::PropertyLength","StringerOverlap","Structure",QT_TRANSLATE_NOOP("App::Property","The overlap of the stringers above the bottom of the treads")) + obj.addProperty("App::PropertyLength","StringerOverlap","Structure",QT_TRANSLATE_NOOP("App::Property","The overlap of the stringers above the bottom of the treads"), locked=True) # general data if not numberofsteps: diff --git a/src/Mod/BIM/ArchStructure.py b/src/Mod/BIM/ArchStructure.py index 942fb8bee2..51ff60dc9e 100644 --- a/src/Mod/BIM/ArchStructure.py +++ b/src/Mod/BIM/ArchStructure.py @@ -673,45 +673,45 @@ class _Structure(ArchComponent.Component): pl = obj.PropertiesList if not "Tool" in pl: - obj.addProperty("App::PropertyLinkSubList", "Tool", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "An optional extrusion path for this element")) + obj.addProperty("App::PropertyLinkSubList", "Tool", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "An optional extrusion path for this element"), locked=True) if not "ComputedLength" in pl: - obj.addProperty("App::PropertyDistance", "ComputedLength", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "The computed length of the extrusion path"), 1) + obj.addProperty("App::PropertyDistance", "ComputedLength", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "The computed length of the extrusion path"), 1, locked=True) if not "ToolOffsetFirst" in pl: - obj.addProperty("App::PropertyDistance", "ToolOffsetFirst", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Start offset distance along the extrusion path (positive: extend, negative: trim)")) + obj.addProperty("App::PropertyDistance", "ToolOffsetFirst", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Start offset distance along the extrusion path (positive: extend, negative: trim)"), locked=True) if not "ToolOffsetLast" in pl: - obj.addProperty("App::PropertyDistance", "ToolOffsetLast", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "End offset distance along the extrusion path (positive: extend, negative: trim)")) + obj.addProperty("App::PropertyDistance", "ToolOffsetLast", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "End offset distance along the extrusion path (positive: extend, negative: trim)"), locked=True) if not "BasePerpendicularToTool" in pl: - obj.addProperty("App::PropertyBool", "BasePerpendicularToTool", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Automatically align the Base of the Structure perpendicular to the Tool axis")) + obj.addProperty("App::PropertyBool", "BasePerpendicularToTool", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Automatically align the Base of the Structure perpendicular to the Tool axis"), locked=True) if not "BaseOffsetX" in pl: - obj.addProperty("App::PropertyDistance", "BaseOffsetX", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "X offset between the Base origin and the Tool axis (only used if BasePerpendicularToTool is True)")) + obj.addProperty("App::PropertyDistance", "BaseOffsetX", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "X offset between the Base origin and the Tool axis (only used if BasePerpendicularToTool is True)"), locked=True) if not "BaseOffsetY" in pl: - obj.addProperty("App::PropertyDistance", "BaseOffsetY", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Y offset between the Base origin and the Tool axis (only used if BasePerpendicularToTool is True)")) + obj.addProperty("App::PropertyDistance", "BaseOffsetY", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Y offset between the Base origin and the Tool axis (only used if BasePerpendicularToTool is True)"), locked=True) if not "BaseMirror" in pl: - obj.addProperty("App::PropertyBool", "BaseMirror", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Mirror the Base along its Y axis (only used if BasePerpendicularToTool is True)")) + obj.addProperty("App::PropertyBool", "BaseMirror", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Mirror the Base along its Y axis (only used if BasePerpendicularToTool is True)"), locked=True) if not "BaseRotation" in pl: - obj.addProperty("App::PropertyAngle", "BaseRotation", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Base rotation around the Tool axis (only used if BasePerpendicularToTool is True)")) + obj.addProperty("App::PropertyAngle", "BaseRotation", "ExtrusionPath", QT_TRANSLATE_NOOP("App::Property", "Base rotation around the Tool axis (only used if BasePerpendicularToTool is True)"), locked=True) if not "Length" in pl: - obj.addProperty("App::PropertyLength","Length","Structure",QT_TRANSLATE_NOOP("App::Property","The length of this element, if not based on a profile")) + obj.addProperty("App::PropertyLength","Length","Structure",QT_TRANSLATE_NOOP("App::Property","The length of this element, if not based on a profile"), locked=True) if not "Width" in pl: - obj.addProperty("App::PropertyLength","Width","Structure",QT_TRANSLATE_NOOP("App::Property","The width of this element, if not based on a profile")) + obj.addProperty("App::PropertyLength","Width","Structure",QT_TRANSLATE_NOOP("App::Property","The width of this element, if not based on a profile"), locked=True) if not "Height" in pl: - obj.addProperty("App::PropertyLength","Height","Structure",QT_TRANSLATE_NOOP("App::Property","The height or extrusion depth of this element. Keep 0 for automatic")) + obj.addProperty("App::PropertyLength","Height","Structure",QT_TRANSLATE_NOOP("App::Property","The height or extrusion depth of this element. Keep 0 for automatic"), locked=True) if not "Normal" in pl: - obj.addProperty("App::PropertyVector","Normal","Structure",QT_TRANSLATE_NOOP("App::Property","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)")) + obj.addProperty("App::PropertyVector","Normal","Structure",QT_TRANSLATE_NOOP("App::Property","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)"), locked=True) if not "Nodes" in pl: - obj.addProperty("App::PropertyVectorList","Nodes","Structure",QT_TRANSLATE_NOOP("App::Property","The structural nodes of this element")) + obj.addProperty("App::PropertyVectorList","Nodes","Structure",QT_TRANSLATE_NOOP("App::Property","The structural nodes of this element"), locked=True) if not "Profile" in pl: - obj.addProperty("App::PropertyString","Profile","Structure",QT_TRANSLATE_NOOP("App::Property","A description of the standard profile this element is based upon")) + obj.addProperty("App::PropertyString","Profile","Structure",QT_TRANSLATE_NOOP("App::Property","A description of the standard profile this element is based upon"), locked=True) if not "NodesOffset" in pl: - obj.addProperty("App::PropertyDistance","NodesOffset","Structure",QT_TRANSLATE_NOOP("App::Property","Offset distance between the centerline and the nodes line")) + obj.addProperty("App::PropertyDistance","NodesOffset","Structure",QT_TRANSLATE_NOOP("App::Property","Offset distance between the centerline and the nodes line"), locked=True) if not "FaceMaker" in pl: - obj.addProperty("App::PropertyEnumeration","FaceMaker","Structure",QT_TRANSLATE_NOOP("App::Property","The facemaker type to use to build the profile of this object")) + obj.addProperty("App::PropertyEnumeration","FaceMaker","Structure",QT_TRANSLATE_NOOP("App::Property","The facemaker type to use to build the profile of this object"), locked=True) obj.FaceMaker = ["None","Simple","Cheese","Bullseye"] if not "ArchSketchData" in pl: - obj.addProperty("App::PropertyBool","ArchSketchData","Structure",QT_TRANSLATE_NOOP("App::Property","Use Base ArchSketch (if used) data (e.g. widths, aligns, offsets) instead of Wall's properties")) + obj.addProperty("App::PropertyBool","ArchSketchData","Structure",QT_TRANSLATE_NOOP("App::Property","Use Base ArchSketch (if used) data (e.g. widths, aligns, offsets) instead of Wall's properties"), locked=True) obj.ArchSketchData = True if not "ArchSketchEdges" in pl: # PropertyStringList - obj.addProperty("App::PropertyStringList","ArchSketchEdges","Structure",QT_TRANSLATE_NOOP("App::Property","Selected edges (or group of edges) of the base ArchSketch, to use in creating the shape of this BIM Structure (instead of using all the Base shape's edges by default). Input are index numbers of edges or groups.")) + obj.addProperty("App::PropertyStringList","ArchSketchEdges","Structure",QT_TRANSLATE_NOOP("App::Property","Selected edges (or group of edges) of the base ArchSketch, to use in creating the shape of this BIM Structure (instead of using all the Base shape's edges by default). Input are index numbers of edges or groups."), locked=True) else: # test if the property was added but as IntegerList, then update; type = obj.getTypeIdOfProperty('ArchSketchEdges') @@ -719,10 +719,10 @@ class _Structure(ArchComponent.Component): oldIntValue = obj.ArchSketchEdges newStrValue = [str(x) for x in oldIntValue] obj.removeProperty("ArchSketchEdges") - obj.addProperty("App::PropertyStringList","ArchSketchEdges","Structure",QT_TRANSLATE_NOOP("App::Property","Selected edges (or group of edges) of the base ArchSketch, to use in creating the shape of this BIM Structure (instead of using all the Base shape's edges by default). Input are index numbers of edges or groups.")) + obj.addProperty("App::PropertyStringList","ArchSketchEdges","Structure",QT_TRANSLATE_NOOP("App::Property","Selected edges (or group of edges) of the base ArchSketch, to use in creating the shape of this BIM Structure (instead of using all the Base shape's edges by default). Input are index numbers of edges or groups."), locked=True) obj.ArchSketchEdges = newStrValue if not hasattr(obj,"ArchSketchPropertySet"): - obj.addProperty("App::PropertyEnumeration","ArchSketchPropertySet","Structure",QT_TRANSLATE_NOOP("App::Property","Select User Defined PropertySet to use in creating variant shape, with same ArchSketch ")) + obj.addProperty("App::PropertyEnumeration","ArchSketchPropertySet","Structure",QT_TRANSLATE_NOOP("App::Property","Select User Defined PropertySet to use in creating variant shape, with same ArchSketch "), locked=True) obj.ArchSketchPropertySet = ['Default'] if not hasattr(self,"ArchSkPropSetPickedUuid"): self.ArchSkPropSetPickedUuid = '' @@ -1186,17 +1186,17 @@ class _ViewProviderStructure(ArchComponent.ViewProviderComponent): pl = vobj.PropertiesList if not "ShowNodes" in pl: - vobj.addProperty("App::PropertyBool","ShowNodes","Nodes",QT_TRANSLATE_NOOP("App::Property","If the nodes are visible or not")).ShowNodes = False + vobj.addProperty("App::PropertyBool","ShowNodes","Nodes",QT_TRANSLATE_NOOP("App::Property","If the nodes are visible or not"), locked=True).ShowNodes = False if not "NodeLine" in pl: - vobj.addProperty("App::PropertyFloat","NodeLine","Nodes",QT_TRANSLATE_NOOP("App::Property","The width of the nodes line")) + vobj.addProperty("App::PropertyFloat","NodeLine","Nodes",QT_TRANSLATE_NOOP("App::Property","The width of the nodes line"), locked=True) if not "NodeSize" in pl: - vobj.addProperty("App::PropertyFloat","NodeSize","Nodes",QT_TRANSLATE_NOOP("App::Property","The size of the node points")) + vobj.addProperty("App::PropertyFloat","NodeSize","Nodes",QT_TRANSLATE_NOOP("App::Property","The size of the node points"), locked=True) vobj.NodeSize = 6 if not "NodeColor" in pl: - vobj.addProperty("App::PropertyColor","NodeColor","Nodes",QT_TRANSLATE_NOOP("App::Property","The color of the nodes line")) + vobj.addProperty("App::PropertyColor","NodeColor","Nodes",QT_TRANSLATE_NOOP("App::Property","The color of the nodes line"), locked=True) vobj.NodeColor = (1.0,1.0,1.0,1.0) if not "NodeType" in pl: - vobj.addProperty("App::PropertyEnumeration","NodeType","Nodes",QT_TRANSLATE_NOOP("App::Property","The type of structural node")) + vobj.addProperty("App::PropertyEnumeration","NodeType","Nodes",QT_TRANSLATE_NOOP("App::Property","The type of structural node"), locked=True) vobj.NodeType = ["Linear","Area"] def onDocumentRestored(self,vobj): @@ -1495,7 +1495,7 @@ class StructureTaskPanel(ArchComponent.ComponentTaskPanel): if self.Object.getTypeIdOfProperty("Tool") != "App::PropertyLinkSubList": # Upgrade property Tool from App::PropertyLink to App::PropertyLinkSubList (note: Undo/Redo fails) self.Object.removeProperty("Tool") - self.Object.addProperty("App::PropertyLinkSubList", "Tool", "Structure", QT_TRANSLATE_NOOP("App::Property", "An optional extrusion path for this element")) + self.Object.addProperty("App::PropertyLinkSubList", "Tool", "Structure", QT_TRANSLATE_NOOP("App::Property", "An optional extrusion path for this element"), locked=True) self.Object.Tool = objectList QtCore.QObject.disconnect(self.selectToolButton, QtCore.SIGNAL("clicked()"), self.setToolFromSelection) QtCore.QObject.connect(self.selectToolButton, QtCore.SIGNAL("clicked()"), self.setSelectionFromTool) @@ -1530,9 +1530,9 @@ class _StructuralSystem(ArchComponent.Component): # OBSOLETE - All Arch objects def __init__(self,obj): ArchComponent.Component.__init__(self,obj) - obj.addProperty("App::PropertyLinkList","Axes","Arch",QT_TRANSLATE_NOOP("App::Property","Axes systems this structure is built on")) - obj.addProperty("App::PropertyIntegerList","Exclude","Arch",QT_TRANSLATE_NOOP("App::Property","The element numbers to exclude when this structure is based on axes")) - obj.addProperty("App::PropertyBool","Align","Arch",QT_TRANSLATE_NOOP("App::Property","If true the element are aligned with axes")).Align = False + obj.addProperty("App::PropertyLinkList","Axes","Arch",QT_TRANSLATE_NOOP("App::Property","Axes systems this structure is built on"), locked=True) + obj.addProperty("App::PropertyIntegerList","Exclude","Arch",QT_TRANSLATE_NOOP("App::Property","The element numbers to exclude when this structure is based on axes"), locked=True) + obj.addProperty("App::PropertyBool","Align","Arch",QT_TRANSLATE_NOOP("App::Property","If true the element are aligned with axes"), locked=True).Align = False self.Type = "StructuralSystem" def execute(self,obj): diff --git a/src/Mod/BIM/ArchTruss.py b/src/Mod/BIM/ArchTruss.py index 6f12f09f72..7b6108607b 100644 --- a/src/Mod/BIM/ArchTruss.py +++ b/src/Mod/BIM/ArchTruss.py @@ -70,60 +70,60 @@ class Truss(ArchComponent.Component): pl = obj.PropertiesList if not "TrussAngle" in pl: obj.addProperty("App::PropertyAngle","TrussAngle","Truss", - QT_TRANSLATE_NOOP("App::Property","The angle of the truss")) + QT_TRANSLATE_NOOP("App::Property","The angle of the truss"), locked=True) obj.setEditorMode("TrussAngle",1) if not "SlantType" in pl: obj.addProperty("App::PropertyEnumeration","SlantType","Truss", - QT_TRANSLATE_NOOP("App::Property","The slant type of this truss")) + QT_TRANSLATE_NOOP("App::Property","The slant type of this truss"), locked=True) obj.SlantType = ["Simple","Double"] if not "Normal" in pl: obj.addProperty("App::PropertyVector","Normal","Truss", - QT_TRANSLATE_NOOP("App::Property","The normal direction of this truss")) + QT_TRANSLATE_NOOP("App::Property","The normal direction of this truss"), locked=True) obj.Normal = FreeCAD.Vector(0,0,1) if not "HeightStart" in pl: obj.addProperty("App::PropertyLength","HeightStart","Truss", - QT_TRANSLATE_NOOP("App::Property","The height of the truss at the start position")) + QT_TRANSLATE_NOOP("App::Property","The height of the truss at the start position"), locked=True) obj.HeightStart = 100 if not "HeightEnd" in pl: obj.addProperty("App::PropertyLength","HeightEnd","Truss", - QT_TRANSLATE_NOOP("App::Property","The height of the truss at the end position")) + QT_TRANSLATE_NOOP("App::Property","The height of the truss at the end position"), locked=True) obj.HeightEnd = 200 if not "StrutStartOffset" in pl: obj.addProperty("App::PropertyDistance","StrutStartOffset","Truss", - QT_TRANSLATE_NOOP("App::Property","An optional start offset for the top strut")) + QT_TRANSLATE_NOOP("App::Property","An optional start offset for the top strut"), locked=True) if not "StrutEndOffset" in pl: obj.addProperty("App::PropertyDistance","StrutEndOffset","Truss", - QT_TRANSLATE_NOOP("App::Property","An optional end offset for the top strut")) + QT_TRANSLATE_NOOP("App::Property","An optional end offset for the top strut"), locked=True) if not "StrutHeight" in pl: obj.addProperty("App::PropertyLength","StrutHeight","Truss", - QT_TRANSLATE_NOOP("App::Property","The height of the main top and bottom elements of the truss")) + QT_TRANSLATE_NOOP("App::Property","The height of the main top and bottom elements of the truss"), locked=True) obj.StrutHeight = 10 if not "StrutWidth" in pl: obj.addProperty("App::PropertyLength","StrutWidth","Truss", - QT_TRANSLATE_NOOP("App::Property","The width of the main top and bottom elements of the truss")) + QT_TRANSLATE_NOOP("App::Property","The width of the main top and bottom elements of the truss"), locked=True) obj.StrutWidth = 5 if not "RodType" in pl: obj.addProperty("App::PropertyEnumeration","RodType","Truss", - QT_TRANSLATE_NOOP("App::Property","The type of the middle element of the truss")) + QT_TRANSLATE_NOOP("App::Property","The type of the middle element of the truss"), locked=True) obj.RodType = ["Round","Square"] if not "RodDirection" in pl: obj.addProperty("App::PropertyEnumeration","RodDirection","Truss", - QT_TRANSLATE_NOOP("App::Property","The direction of the rods")) + QT_TRANSLATE_NOOP("App::Property","The direction of the rods"), locked=True) obj.RodDirection = ["Forward","Backward"] if not "RodSize" in pl: obj.addProperty("App::PropertyLength","RodSize","Truss", - QT_TRANSLATE_NOOP("App::Property","The diameter or side of the rods")) + QT_TRANSLATE_NOOP("App::Property","The diameter or side of the rods"), locked=True) obj.RodSize = 2 if not "RodSections" in pl: obj.addProperty("App::PropertyInteger","RodSections","Truss", - QT_TRANSLATE_NOOP("App::Property","The number of rod sections")) + QT_TRANSLATE_NOOP("App::Property","The number of rod sections"), locked=True) obj.RodSections = 3 if not "RodEnd" in pl: obj.addProperty("App::PropertyBool","RodEnd","Truss", - QT_TRANSLATE_NOOP("App::Property","If the truss has a rod at its endpoint or not")) + QT_TRANSLATE_NOOP("App::Property","If the truss has a rod at its endpoint or not"), locked=True) if not "RodMode" in pl: obj.addProperty("App::PropertyEnumeration","RodMode","Truss", - QT_TRANSLATE_NOOP("App::Property","How to draw the rods")) + QT_TRANSLATE_NOOP("App::Property","How to draw the rods"), locked=True) obj.RodMode = rodmodes self.Type = "Truss" diff --git a/src/Mod/BIM/ArchWall.py b/src/Mod/BIM/ArchWall.py index 079230b4a4..9388719549 100644 --- a/src/Mod/BIM/ArchWall.py +++ b/src/Mod/BIM/ArchWall.py @@ -166,63 +166,63 @@ class _Wall(ArchComponent.Component): lp = obj.PropertiesList if not "Length" in lp: - obj.addProperty("App::PropertyLength","Length","Wall",QT_TRANSLATE_NOOP("App::Property","The length of this wall. Read-only if this wall is not based on an unconstrained sketch with a single edge, or on a Draft Wire with a single edge. Refer to wiki for details how length is deduced.")) + obj.addProperty("App::PropertyLength","Length","Wall",QT_TRANSLATE_NOOP("App::Property","The length of this wall. Read-only if this wall is not based on an unconstrained sketch with a single edge, or on a Draft Wire with a single edge. Refer to wiki for details how length is deduced."), locked=True) if not "Width" in lp: - obj.addProperty("App::PropertyLength","Width","Wall",QT_TRANSLATE_NOOP("App::Property","The width of this wall. Not used if this wall is based on a face. Disabled and ignored if Base object (ArchSketch) provides the information.")) + obj.addProperty("App::PropertyLength","Width","Wall",QT_TRANSLATE_NOOP("App::Property","The width of this wall. Not used if this wall is based on a face. Disabled and ignored if Base object (ArchSketch) provides the information."), locked=True) # To be combined into Width when PropertyLengthList is available if not "OverrideWidth" in lp: - obj.addProperty("App::PropertyFloatList","OverrideWidth","Wall",QT_TRANSLATE_NOOP("App::Property","This overrides Width attribute to set width of each segment of wall. Disabled and ignored if Base object (ArchSketch) provides Widths information, with getWidths() method (If a value is zero, the value of 'Width' will be followed). [ENHANCEMENT by ArchSketch] GUI 'Edit Wall Segment Width' Tool is provided in external SketchArch Add-on to let users to set the values interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used.")) # see DraftGeomUtils.offsetwire() + obj.addProperty("App::PropertyFloatList","OverrideWidth","Wall",QT_TRANSLATE_NOOP("App::Property","This overrides Width attribute to set width of each segment of wall. Disabled and ignored if Base object (ArchSketch) provides Widths information, with getWidths() method (If a value is zero, the value of 'Width' will be followed). [ENHANCEMENT by ArchSketch] GUI 'Edit Wall Segment Width' Tool is provided in external SketchArch Add-on to let users to set the values interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used."), locked=True) # see DraftGeomUtils.offsetwire() if not "OverrideAlign" in lp: - obj.addProperty("App::PropertyStringList","OverrideAlign","Wall",QT_TRANSLATE_NOOP("App::Property","This overrides Align attribute to set align of each segment of wall. Disabled and ignored if Base object (ArchSketch) provides Aligns information, with getAligns() method (If a value is not 'Left, Right, Center', the value of 'Align' will be followed). [ENHANCEMENT by ArchSketch] GUI 'Edit Wall Segment Align' Tool is provided in external SketchArch Add-on to let users to set the values interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used.")) # see DraftGeomUtils.offsetwire() + obj.addProperty("App::PropertyStringList","OverrideAlign","Wall",QT_TRANSLATE_NOOP("App::Property","This overrides Align attribute to set align of each segment of wall. Disabled and ignored if Base object (ArchSketch) provides Aligns information, with getAligns() method (If a value is not 'Left, Right, Center', the value of 'Align' will be followed). [ENHANCEMENT by ArchSketch] GUI 'Edit Wall Segment Align' Tool is provided in external SketchArch Add-on to let users to set the values interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used."), locked=True) # see DraftGeomUtils.offsetwire() if not "OverrideOffset" in lp: - obj.addProperty("App::PropertyFloatList","OverrideOffset","Wall",QT_TRANSLATE_NOOP("App::Property","This overrides Offset attribute to set offset of each segment of wall. Disabled and ignored if Base object (ArchSketch) provides Offsets information, with getOffsets() method (If a value is zero, the value of 'Offset' will be followed). [ENHANCED by ArchSketch] GUI 'Edit Wall Segment Offset' Tool is provided in external Add-on ('SketchArch') to let users to select the edges interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used. Property is ignored if Base ArchSketch provided the selected edges. ")) # see DraftGeomUtils.offsetwire() + obj.addProperty("App::PropertyFloatList","OverrideOffset","Wall",QT_TRANSLATE_NOOP("App::Property","This overrides Offset attribute to set offset of each segment of wall. Disabled and ignored if Base object (ArchSketch) provides Offsets information, with getOffsets() method (If a value is zero, the value of 'Offset' will be followed). [ENHANCED by ArchSketch] GUI 'Edit Wall Segment Offset' Tool is provided in external Add-on ('SketchArch') to let users to select the edges interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used. Property is ignored if Base ArchSketch provided the selected edges. "), locked=True) # see DraftGeomUtils.offsetwire() if not "Height" in lp: - obj.addProperty("App::PropertyLength","Height","Wall",QT_TRANSLATE_NOOP("App::Property","The height of this wall. Keep 0 for automatic. Not used if this wall is based on a solid")) + obj.addProperty("App::PropertyLength","Height","Wall",QT_TRANSLATE_NOOP("App::Property","The height of this wall. Keep 0 for automatic. Not used if this wall is based on a solid"), locked=True) if not "Area" in lp: - obj.addProperty("App::PropertyArea","Area","Wall",QT_TRANSLATE_NOOP("App::Property","The area of this wall as a simple Height * Length calculation")) + obj.addProperty("App::PropertyArea","Area","Wall",QT_TRANSLATE_NOOP("App::Property","The area of this wall as a simple Height * Length calculation"), locked=True) obj.setEditorMode("Area",1) if not "Align" in lp: - obj.addProperty("App::PropertyEnumeration","Align","Wall",QT_TRANSLATE_NOOP("App::Property","The alignment of this wall on its base object, if applicable. Disabled and ignored if Base object (ArchSketch) provides the information.")) + obj.addProperty("App::PropertyEnumeration","Align","Wall",QT_TRANSLATE_NOOP("App::Property","The alignment of this wall on its base object, if applicable. Disabled and ignored if Base object (ArchSketch) provides the information."), locked=True) obj.Align = ['Left','Right','Center'] if not "Normal" in lp: - obj.addProperty("App::PropertyVector","Normal","Wall",QT_TRANSLATE_NOOP("App::Property","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)")) + obj.addProperty("App::PropertyVector","Normal","Wall",QT_TRANSLATE_NOOP("App::Property","The normal extrusion direction of this object (keep (0,0,0) for automatic normal)"), locked=True) if not "Face" in lp: - obj.addProperty("App::PropertyInteger","Face","Wall",QT_TRANSLATE_NOOP("App::Property","The face number of the base object used to build this wall")) + obj.addProperty("App::PropertyInteger","Face","Wall",QT_TRANSLATE_NOOP("App::Property","The face number of the base object used to build this wall"), locked=True) if not "Offset" in lp: - obj.addProperty("App::PropertyDistance","Offset","Wall",QT_TRANSLATE_NOOP("App::Property","The offset between this wall and its baseline (only for left and right alignments). Disabled and ignored if Base object (ArchSketch) provides the information.")) + obj.addProperty("App::PropertyDistance","Offset","Wall",QT_TRANSLATE_NOOP("App::Property","The offset between this wall and its baseline (only for left and right alignments). Disabled and ignored if Base object (ArchSketch) provides the information."), locked=True) # See getExtrusionData(), removeSplitters are no longer used #if not "Refine" in lp: - # obj.addProperty("App::PropertyEnumeration","Refine","Wall",QT_TRANSLATE_NOOP("App::Property","Select whether or not and the method to remove splitter of the Wall. Currently Draft removeSplitter and Part removeSplitter available but may not work on complex sketch.")) + # obj.addProperty("App::PropertyEnumeration","Refine","Wall",QT_TRANSLATE_NOOP("App::Property","Select whether or not and the method to remove splitter of the Wall. Currently Draft removeSplitter and Part removeSplitter available but may not work on complex sketch."), locked=True) # obj.Refine = ['No','DraftRemoveSplitter','PartRemoveSplitter'] # TODO - To implement in Arch Component ? if not "MakeBlocks" in lp: - obj.addProperty("App::PropertyBool","MakeBlocks","Blocks",QT_TRANSLATE_NOOP("App::Property","Enable this to make the wall generate blocks")) + obj.addProperty("App::PropertyBool","MakeBlocks","Blocks",QT_TRANSLATE_NOOP("App::Property","Enable this to make the wall generate blocks"), locked=True) if not "BlockLength" in lp: - obj.addProperty("App::PropertyLength","BlockLength","Blocks",QT_TRANSLATE_NOOP("App::Property","The length of each block")) + obj.addProperty("App::PropertyLength","BlockLength","Blocks",QT_TRANSLATE_NOOP("App::Property","The length of each block"), locked=True) if not "BlockHeight" in lp: - obj.addProperty("App::PropertyLength","BlockHeight","Blocks",QT_TRANSLATE_NOOP("App::Property","The height of each block")) + obj.addProperty("App::PropertyLength","BlockHeight","Blocks",QT_TRANSLATE_NOOP("App::Property","The height of each block"), locked=True) if not "OffsetFirst" in lp: - obj.addProperty("App::PropertyLength","OffsetFirst","Blocks",QT_TRANSLATE_NOOP("App::Property","The horizontal offset of the first line of blocks")) + obj.addProperty("App::PropertyLength","OffsetFirst","Blocks",QT_TRANSLATE_NOOP("App::Property","The horizontal offset of the first line of blocks"), locked=True) if not "OffsetSecond" in lp: - obj.addProperty("App::PropertyLength","OffsetSecond","Blocks",QT_TRANSLATE_NOOP("App::Property","The horizontal offset of the second line of blocks")) + obj.addProperty("App::PropertyLength","OffsetSecond","Blocks",QT_TRANSLATE_NOOP("App::Property","The horizontal offset of the second line of blocks"), locked=True) if not "Joint" in lp: - obj.addProperty("App::PropertyLength","Joint","Blocks",QT_TRANSLATE_NOOP("App::Property","The size of the joints between each block")) + obj.addProperty("App::PropertyLength","Joint","Blocks",QT_TRANSLATE_NOOP("App::Property","The size of the joints between each block"), locked=True) if not "CountEntire" in lp: - obj.addProperty("App::PropertyInteger","CountEntire","Blocks",QT_TRANSLATE_NOOP("App::Property","The number of entire blocks")) + obj.addProperty("App::PropertyInteger","CountEntire","Blocks",QT_TRANSLATE_NOOP("App::Property","The number of entire blocks"), locked=True) obj.setEditorMode("CountEntire",1) if not "CountBroken" in lp: - obj.addProperty("App::PropertyInteger","CountBroken","Blocks",QT_TRANSLATE_NOOP("App::Property","The number of broken blocks")) + obj.addProperty("App::PropertyInteger","CountBroken","Blocks",QT_TRANSLATE_NOOP("App::Property","The number of broken blocks"), locked=True) obj.setEditorMode("CountBroken",1) if not "ArchSketchData" in lp: - obj.addProperty("App::PropertyBool","ArchSketchData","Wall",QT_TRANSLATE_NOOP("App::Property","Use Base ArchSketch (if used) data (e.g. widths, aligns, offsets) instead of Wall's properties")) + obj.addProperty("App::PropertyBool","ArchSketchData","Wall",QT_TRANSLATE_NOOP("App::Property","Use Base ArchSketch (if used) data (e.g. widths, aligns, offsets) instead of Wall's properties"), locked=True) obj.ArchSketchData = True if not "ArchSketchEdges" in lp: - obj.addProperty("App::PropertyStringList","ArchSketchEdges","Wall",QT_TRANSLATE_NOOP("App::Property","Selected edges (or group of edges) of the base Sketch/ArchSketch, to use in creating the shape of this Arch Wall (instead of using all the Base Sketch/ArchSketch's edges by default). Input are index numbers of edges or groups. Disabled and ignored if Base object (ArchSketch) provides selected edges (as Wall Axis) information, with getWallBaseShapeEdgesInfo() method. [ENHANCEMENT by ArchSketch] GUI 'Edit Wall Segment' Tool is provided in external SketchArch Add-on to let users to (de)select the edges interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used.")) + obj.addProperty("App::PropertyStringList","ArchSketchEdges","Wall",QT_TRANSLATE_NOOP("App::Property","Selected edges (or group of edges) of the base Sketch/ArchSketch, to use in creating the shape of this Arch Wall (instead of using all the Base Sketch/ArchSketch's edges by default). Input are index numbers of edges or groups. Disabled and ignored if Base object (ArchSketch) provides selected edges (as Wall Axis) information, with getWallBaseShapeEdgesInfo() method. [ENHANCEMENT by ArchSketch] GUI 'Edit Wall Segment' Tool is provided in external SketchArch Add-on to let users to (de)select the edges interactively. 'Toponaming-Tolerant' if ArchSketch is used in Base (and SketchArch Add-on is installed). Warning : Not 'Toponaming-Tolerant' if just Sketch is used."), locked=True) if not hasattr(obj,"ArchSketchPropertySet"): - obj.addProperty("App::PropertyEnumeration","ArchSketchPropertySet","Wall",QT_TRANSLATE_NOOP("App::Property","Select User Defined PropertySet to use in creating variant shape, layers of the Arch Wall with same ArchSketch ")) + obj.addProperty("App::PropertyEnumeration","ArchSketchPropertySet","Wall",QT_TRANSLATE_NOOP("App::Property","Select User Defined PropertySet to use in creating variant shape, layers of the Arch Wall with same ArchSketch "), locked=True) obj.ArchSketchPropertySet = ['Default'] if not hasattr(self,"ArchSkPropSetPickedUuid"): # 'obj.Proxy', 'self' not works ? self.ArchSkPropSetPickedUuid = '' diff --git a/src/Mod/BIM/ArchWindow.py b/src/Mod/BIM/ArchWindow.py index ad38f04f48..a7de740d6a 100644 --- a/src/Mod/BIM/ArchWindow.py +++ b/src/Mod/BIM/ArchWindow.py @@ -125,41 +125,41 @@ class _Window(ArchComponent.Component): lp = obj.PropertiesList if not "Hosts" in lp: - obj.addProperty("App::PropertyLinkList","Hosts","Window",QT_TRANSLATE_NOOP("App::Property","The objects that host this window")) + obj.addProperty("App::PropertyLinkList","Hosts","Window",QT_TRANSLATE_NOOP("App::Property","The objects that host this window"), locked=True) if not "WindowParts" in lp: - obj.addProperty("App::PropertyStringList","WindowParts","Window",QT_TRANSLATE_NOOP("App::Property","The components of this window")) + obj.addProperty("App::PropertyStringList","WindowParts","Window",QT_TRANSLATE_NOOP("App::Property","The components of this window"), locked=True) obj.setEditorMode("WindowParts",2) if not "HoleDepth" in lp: - obj.addProperty("App::PropertyLength","HoleDepth","Window",QT_TRANSLATE_NOOP("App::Property","The depth of the hole that this window makes in its host object. If 0, the value will be calculated automatically.")) + obj.addProperty("App::PropertyLength","HoleDepth","Window",QT_TRANSLATE_NOOP("App::Property","The depth of the hole that this window makes in its host object. If 0, the value will be calculated automatically."), locked=True) if not "Subvolume" in lp: - obj.addProperty("App::PropertyLink","Subvolume","Window",QT_TRANSLATE_NOOP("App::Property","An optional object that defines a volume to be subtracted from hosts of this window")) + obj.addProperty("App::PropertyLink","Subvolume","Window",QT_TRANSLATE_NOOP("App::Property","An optional object that defines a volume to be subtracted from hosts of this window"), locked=True) if not "Width" in lp: - obj.addProperty("App::PropertyLength","Width","Window",QT_TRANSLATE_NOOP("App::Property","The width of this window")) + obj.addProperty("App::PropertyLength","Width","Window",QT_TRANSLATE_NOOP("App::Property","The width of this window"), locked=True) if not "Height" in lp: - obj.addProperty("App::PropertyLength","Height","Window",QT_TRANSLATE_NOOP("App::Property","The height of this window")) + obj.addProperty("App::PropertyLength","Height","Window",QT_TRANSLATE_NOOP("App::Property","The height of this window"), locked=True) if not "Normal" in lp: - obj.addProperty("App::PropertyVector","Normal","Window",QT_TRANSLATE_NOOP("App::Property","The normal direction of this window")) + obj.addProperty("App::PropertyVector","Normal","Window",QT_TRANSLATE_NOOP("App::Property","The normal direction of this window"), locked=True) if not "Preset" in lp: - obj.addProperty("App::PropertyInteger","Preset","Window",QT_TRANSLATE_NOOP("App::Property","The preset number this window is based on")) + obj.addProperty("App::PropertyInteger","Preset","Window",QT_TRANSLATE_NOOP("App::Property","The preset number this window is based on"), locked=True) obj.setEditorMode("Preset",2) if not "Frame" in lp: - obj.addProperty("App::PropertyLength","Frame","Window",QT_TRANSLATE_NOOP("App::Property","The frame size of this window")) + obj.addProperty("App::PropertyLength","Frame","Window",QT_TRANSLATE_NOOP("App::Property","The frame size of this window"), locked=True) if not "Offset" in lp: - obj.addProperty("App::PropertyLength","Offset","Window",QT_TRANSLATE_NOOP("App::Property","The offset size of this window")) + obj.addProperty("App::PropertyLength","Offset","Window",QT_TRANSLATE_NOOP("App::Property","The offset size of this window"), locked=True) if not "Area" in lp: - obj.addProperty("App::PropertyArea","Area","Window",QT_TRANSLATE_NOOP("App::Property","The area of this window")) + obj.addProperty("App::PropertyArea","Area","Window",QT_TRANSLATE_NOOP("App::Property","The area of this window"), locked=True) if not "LouvreWidth" in lp: - obj.addProperty("App::PropertyLength","LouvreWidth","Window",QT_TRANSLATE_NOOP("App::Property","The width of louvre elements")) + obj.addProperty("App::PropertyLength","LouvreWidth","Window",QT_TRANSLATE_NOOP("App::Property","The width of louvre elements"), locked=True) if not "LouvreSpacing" in lp: - obj.addProperty("App::PropertyLength","LouvreSpacing","Window",QT_TRANSLATE_NOOP("App::Property","The space between louvre elements")) + obj.addProperty("App::PropertyLength","LouvreSpacing","Window",QT_TRANSLATE_NOOP("App::Property","The space between louvre elements"), locked=True) if not "Opening" in lp: - obj.addProperty("App::PropertyPercent","Opening","Window",QT_TRANSLATE_NOOP("App::Property","Opens the subcomponents that have a hinge defined")) + obj.addProperty("App::PropertyPercent","Opening","Window",QT_TRANSLATE_NOOP("App::Property","Opens the subcomponents that have a hinge defined"), locked=True) if not "HoleWire" in lp: - obj.addProperty("App::PropertyInteger","HoleWire","Window",QT_TRANSLATE_NOOP("App::Property","The number of the wire that defines the hole. If 0, the value will be calculated automatically")) + obj.addProperty("App::PropertyInteger","HoleWire","Window",QT_TRANSLATE_NOOP("App::Property","The number of the wire that defines the hole. If 0, the value will be calculated automatically"), locked=True) if not "SymbolPlan" in lp: - obj.addProperty("App::PropertyBool","SymbolPlan","Window",QT_TRANSLATE_NOOP("App::Property","Shows plan opening symbols if available")) + obj.addProperty("App::PropertyBool","SymbolPlan","Window",QT_TRANSLATE_NOOP("App::Property","Shows plan opening symbols if available"), locked=True) if not "SymbolElevation" in lp: - obj.addProperty("App::PropertyBool","SymbolElevation","Window",QT_TRANSLATE_NOOP("App::Property","Show elevation opening symbols if available")) + obj.addProperty("App::PropertyBool","SymbolElevation","Window",QT_TRANSLATE_NOOP("App::Property","Show elevation opening symbols if available"), locked=True) obj.setEditorMode("VerticalArea",2) obj.setEditorMode("HorizontalArea",2) obj.setEditorMode("PerimeterLength",2) @@ -1130,7 +1130,7 @@ class _ArchWindowTaskPanel: val = int(val) if self.obj: if not hasattr(self.obj,"HoleWire"): - self.obj.addProperty("App::PropertyInteger","HoleWire","Arch",QT_TRANSLATE_NOOP("App::Property","The number of the wire that defines the hole. A value of 0 means automatic")) + self.obj.addProperty("App::PropertyInteger","HoleWire","Arch",QT_TRANSLATE_NOOP("App::Property","The number of the wire that defines the hole. A value of 0 means automatic"), locked=True) self.obj.HoleWire = val def getIcon(self,obj): diff --git a/src/Mod/BIM/bimcommands/BimClassification.py b/src/Mod/BIM/bimcommands/BimClassification.py index 74842cebf4..8a408ead88 100644 --- a/src/Mod/BIM/bimcommands/BimClassification.py +++ b/src/Mod/BIM/bimcommands/BimClassification.py @@ -605,7 +605,7 @@ class BIM_Classification: obj.StandardCode = code elif hasattr(obj, "IfcClass"): if not "Classification" in obj.PropertiesList: - obj.addProperty("App::PropertyString", "Classification", "IFC") + obj.addProperty("App::PropertyString", "Classification", "IFC", locked=True) if code != obj.Classification: if not changed: FreeCAD.ActiveDocument.openTransaction( @@ -634,7 +634,7 @@ class BIM_Classification: self.isEditing.StandardCode = code else: if not "Classification" in self.isEditing.PropertiesList: - self.isEditing.addProperty("App::PropertyString", "Classification", "IFC") + self.isEditing.addProperty("App::PropertyString", "Classification", "IFC", locked=True) self.isEditing.Classification = code if hasattr(self.isEditing.ViewObject, "Proxy") and hasattr( self.isEditing.ViewObject.Proxy, "setTaskValue" diff --git a/src/Mod/BIM/bimcommands/BimIfcProperties.py b/src/Mod/BIM/bimcommands/BimIfcProperties.py index 98e7da66a9..fc99e827b8 100644 --- a/src/Mod/BIM/bimcommands/BimIfcProperties.py +++ b/src/Mod/BIM/bimcommands/BimIfcProperties.py @@ -415,6 +415,7 @@ class BIM_IfcProperties: QT_TRANSLATE_NOOP( "App::Property", "IFC properties of this object" ), + locked=True, ) if hasattr(obj, "IfcProperties"): obj.IfcProperties = values[1] diff --git a/src/Mod/BIM/bimcommands/BimIfcQuantities.py b/src/Mod/BIM/bimcommands/BimIfcQuantities.py index 5e738d45c5..ca34f501ce 100644 --- a/src/Mod/BIM/bimcommands/BimIfcQuantities.py +++ b/src/Mod/BIM/bimcommands/BimIfcQuantities.py @@ -210,7 +210,7 @@ class BIM_IfcQuantities: qname = val[i] qtype = QTO_TYPES[val[i+1]] if not qname in obj.PropertiesList: - obj.addProperty(qtype, qname, "Quantities", val[i+1]) + obj.addProperty(qtype, qname, "Quantities", val[i+1], locked=True) qval = 0 i = self.get_row(obj.Name) if i > -1: diff --git a/src/Mod/BIM/bimcommands/BimLayers.py b/src/Mod/BIM/bimcommands/BimLayers.py index 7f874ca4dc..6c5385f0d1 100644 --- a/src/Mod/BIM/bimcommands/BimLayers.py +++ b/src/Mod/BIM/bimcommands/BimLayers.py @@ -171,7 +171,7 @@ class BIM_Layers: obj = Draft.make_layer(self.model.item(row, 1).text()) # By default BIM layers should not swallow their children otherwise # they will disappear from the tree root - obj.ViewObject.addProperty("App::PropertyBool", "HideChildren", "Layer") + obj.ViewObject.addProperty("App::PropertyBool", "HideChildren", "Layer", locked=True) obj.ViewObject.HideChildren = True else: from nativeifc import ifc_tools diff --git a/src/Mod/BIM/importers/importIFC.py b/src/Mod/BIM/importers/importIFC.py index 2f5068dbb0..a889df7fd0 100644 --- a/src/Mod/BIM/importers/importIFC.py +++ b/src/Mod/BIM/importers/importIFC.py @@ -823,7 +823,7 @@ def insert(srcfile, docname, skip=[], only=[], root=None, preferences=None): # fix property type if needed obj.removeProperty("IfcProperties") - obj.addProperty("App::PropertyLink","IfcProperties","Component","Stores IFC properties as a spreadsheet") + obj.addProperty("App::PropertyLink","IfcProperties","Component","Stores IFC properties as a spreadsheet", locked=True) ifc_spreadsheet = Arch.makeIfcSpreadsheet() n = 2 diff --git a/src/Mod/BIM/importers/importSH3DHelper.py b/src/Mod/BIM/importers/importSH3DHelper.py index 7598f8d5f9..b01e6f2c36 100644 --- a/src/Mod/BIM/importers/importSH3DHelper.py +++ b/src/Mod/BIM/importers/importSH3DHelper.py @@ -471,7 +471,7 @@ class SH3DImporter: description (str): a short description of the property to add """ if name not in obj.PropertiesList: - obj.addProperty(property_type, name, group, description) + obj.addProperty(property_type, name, group, description, locked=True) def add_fc_objects(self, obj): """Register `obj`. diff --git a/src/Mod/BIM/nativeifc/ifc_classification.py b/src/Mod/BIM/nativeifc/ifc_classification.py index 531f293e63..adc9faae65 100644 --- a/src/Mod/BIM/nativeifc/ifc_classification.py +++ b/src/Mod/BIM/nativeifc/ifc_classification.py @@ -99,7 +99,7 @@ def show_classification(obj): for rel in ref.ClassificationRefForObjects: if element in rel.RelatedObjects: if not "Classification" in obj.PropertiesList: - obj.addProperty("App::PropertyString", "Classification", "IFC") + obj.addProperty("App::PropertyString", "Classification", "IFC", locked=True) sname = system.Name cname = ref.Name or ref.Identification obj.Classification = sname + " " + cname diff --git a/src/Mod/BIM/nativeifc/ifc_geometry.py b/src/Mod/BIM/nativeifc/ifc_geometry.py index b2f2241422..3cf785bdba 100644 --- a/src/Mod/BIM/nativeifc/ifc_geometry.py +++ b/src/Mod/BIM/nativeifc/ifc_geometry.py @@ -49,12 +49,12 @@ def add_geom_properties(obj): ext = rep.Items[0] if "ExtrusionDepth" not in obj.PropertiesList: obj.addProperty( - "App::PropertyLength", "ExtrusionDepth", "Geometry" + "App::PropertyLength", "ExtrusionDepth", "Geometry", locked=True ) obj.ExtrusionDepth = ext.Depth * scaling if "ExtrusionDirection" not in obj.PropertiesList: obj.addProperty( - "App::PropertyVector", "ExtrusionDirection", "Geometry" + "App::PropertyVector", "ExtrusionDirection", "Geometry", locked=True ) obj.ExtrusionDirection = FreeCAD.Vector( ext.ExtrudedDirection.DirectionRatios @@ -64,12 +64,12 @@ def add_geom_properties(obj): if ext.SweptArea.is_a("IfcRectangleProfileDef"): if "RectangleLength" not in obj.PropertiesList: obj.addProperty( - "App::PropertyLength", "RectangleLength", "Geometry" + "App::PropertyLength", "RectangleLength", "Geometry", locked=True ) obj.RectangleLength = ext.SweptArea.XDim * scaling if "RectangleWidth" not in obj.PropertiesList: obj.addProperty( - "App::PropertyLength", "RectangleWidth", "Geometry" + "App::PropertyLength", "RectangleWidth", "Geometry", locked=True ) obj.RectangleWidth = ext.SweptArea.YDim * scaling @@ -81,6 +81,7 @@ def add_geom_properties(obj): "App::PropertyVectorList", "PolylinePoints", "Geometry", + locked=True, ) points = [ p.Coordinates for p in ext.SweptArea.OuterCurve.Points @@ -103,14 +104,14 @@ def add_geom_properties(obj): "WebThickness", ]: if hasattr(ext.SweptArea, p): - obj.addProperty("App::PropertyLength", p, "Geometry") + obj.addProperty("App::PropertyLength", p, "Geometry", locked=True) value = getattr(ext.SweptArea, p) if not value: value = 0 value = value * scaling setattr(obj, p, value) obj.addProperty( - "App::PropertyString", "ProfileName", "Geometry" + "App::PropertyString", "ProfileName", "Geometry", locked=True ) obj.ProfileName = ext.SweptArea.ProfileName @@ -129,6 +130,7 @@ def add_geom_properties(obj): "App::PropertyPosition", "AxisStart", "Geometry", + locked=True, ) obj.AxisStart = FreeCAD.Vector( pol.Points[0].Coordinates @@ -138,6 +140,7 @@ def add_geom_properties(obj): "App::PropertyPosition", "AxisEnd", "Geometry", + locked=True, ) obj.AxisEnd = FreeCAD.Vector( pol.Points[1].Coordinates diff --git a/src/Mod/BIM/nativeifc/ifc_materials.py b/src/Mod/BIM/nativeifc/ifc_materials.py index 2e00ca0f99..259e21f148 100644 --- a/src/Mod/BIM/nativeifc/ifc_materials.py +++ b/src/Mod/BIM/nativeifc/ifc_materials.py @@ -72,7 +72,7 @@ def show_material(obj): if not material: return if not hasattr(obj, "Material"): - obj.addProperty("App::PropertyLink", "Material", "IFC") + obj.addProperty("App::PropertyLink", "Material", "IFC", locked=True) project = ifc_tools.get_project(obj) matobj = create_material(material, project, recursive=True) obj.Material = matobj diff --git a/src/Mod/BIM/nativeifc/ifc_psets.py b/src/Mod/BIM/nativeifc/ifc_psets.py index bad80e918f..0f1b2c5eee 100644 --- a/src/Mod/BIM/nativeifc/ifc_psets.py +++ b/src/Mod/BIM/nativeifc/ifc_psets.py @@ -166,7 +166,7 @@ def show_psets(obj): value = [value] else: print(pname, gname, obj.PropertiesList) - obj.addProperty(ftype, pname, gname, ttip) + obj.addProperty(ftype, pname, gname, ttip, locked=True) if pname in obj.PropertiesList: setattr(obj, pname, value) diff --git a/src/Mod/BIM/nativeifc/ifc_tools.py b/src/Mod/BIM/nativeifc/ifc_tools.py index a0843b6f73..5f92e3f9da 100644 --- a/src/Mod/BIM/nativeifc/ifc_tools.py +++ b/src/Mod/BIM/nativeifc/ifc_tools.py @@ -138,7 +138,7 @@ def convert_document(document, filename=None, shapemode=0, strategy=0, silent=Fa """ if "Proxy" not in document.PropertiesList: - document.addProperty("App::PropertyPythonObject", "Proxy") + document.addProperty("App::PropertyPythonObject", "Proxy", locked=True) document.setPropertyStatus("Proxy", "Transient") document.Proxy = ifc_objects.document_object() ifcfile, project, full = setup_project(document, filename, shapemode, silent) @@ -165,9 +165,9 @@ def setup_project(proj, filename, shapemode, silent): full = False d = "The path to the linked IFC file" if "IfcFilePath" not in proj.PropertiesList: - proj.addProperty("App::PropertyFile", "IfcFilePath", "Base", d) + proj.addProperty("App::PropertyFile", "IfcFilePath", "Base", d, locked=True) if "Modified" not in proj.PropertiesList: - proj.addProperty("App::PropertyBool", "Modified", "Base") + proj.addProperty("App::PropertyBool", "Modified", "Base", locked=True) proj.setPropertyStatus("Modified", "Hidden") if filename: # opening existing file @@ -185,7 +185,7 @@ def setup_project(proj, filename, shapemode, silent): proj.Proxy.ifcfile = ifcfile add_properties(proj, ifcfile, project, shapemode=shapemode) if "Schema" not in proj.PropertiesList: - proj.addProperty("App::PropertyEnumeration", "Schema", "Base") + proj.addProperty("App::PropertyEnumeration", "Schema", "Base", locked=True) # bug in FreeCAD - to avoid a crash, pre-populate the enum with one value proj.Schema = [ifcfile.wrapped_data.schema_name()] proj.Schema = ifcfile.wrapped_data.schema_name() @@ -564,7 +564,7 @@ def add_object(document, otype=None, oname="IfcObject"): obj = document.addObject("App::FeaturePython", oname, proxy, None, False) if obj.ViewObject: view_layer.ViewProviderLayer(obj.ViewObject) - obj.ViewObject.addProperty("App::PropertyBool", "HideChildren", "Layer") + obj.ViewObject.addProperty("App::PropertyBool", "HideChildren", "Layer", locked=True) obj.ViewObject.HideChildren = True elif otype == "group": vproxy = ifc_viewproviders.ifc_vp_group() @@ -610,9 +610,9 @@ def add_properties( else: obj.Label = "_" + ifcentity.is_a() if isinstance(obj, FreeCAD.DocumentObject) and "Group" not in obj.PropertiesList: - obj.addProperty("App::PropertyLinkList", "Group", "Base") + obj.addProperty("App::PropertyLinkList", "Group", "Base", locked=True) if "ShapeMode" not in obj.PropertiesList: - obj.addProperty("App::PropertyEnumeration", "ShapeMode", "Base") + obj.addProperty("App::PropertyEnumeration", "ShapeMode", "Base", locked=True) shapemodes = [ "Shape", "Coin", @@ -625,7 +625,7 @@ def add_properties( if not obj.isDerivedFrom("Part::Feature"): obj.setPropertyStatus("ShapeMode", "Hidden") if ifcentity.is_a("IfcProduct"): - obj.addProperty("App::PropertyLink", "Type", "IFC") + obj.addProperty("App::PropertyLink", "Type", "IFC", locked=True) attr_defs = ifcentity.wrapped_data.declaration().as_entity().all_attributes() try: info_ifcentity = ifcentity.get_info() @@ -650,7 +650,7 @@ def add_properties( if attr == "Class": # main enum property, not saved to file if attr not in obj.PropertiesList: - obj.addProperty("App::PropertyEnumeration", attr, "IFC") + obj.addProperty("App::PropertyEnumeration", attr, "IFC", locked=True) obj.setPropertyStatus(attr, "Transient") # to avoid bug/crash: we populate first the property with only the # class, then we add the sibling classes @@ -659,7 +659,7 @@ def add_properties( setattr(obj, attr, get_ifc_classes(obj, value)) # companion hidden propertym that gets saved to file if "IfcClass" not in obj.PropertiesList: - obj.addProperty("App::PropertyString", "IfcClass", "IFC") + obj.addProperty("App::PropertyString", "IfcClass", "IFC", locked=True) obj.setPropertyStatus("IfcClass", "Hidden") setattr(obj, "IfcClass", value) elif attr_def and "IfcLengthMeasure" in str(attr_def.type_of_attribute()): @@ -668,17 +668,17 @@ def add_properties( setattr(obj, attr, value * (1 / get_scale(ifcfile))) elif isinstance(value, int): if attr not in obj.PropertiesList: - obj.addProperty("App::PropertyInteger", attr, "IFC") + obj.addProperty("App::PropertyInteger", attr, "IFC", locked=True) if attr == "StepId": obj.setPropertyStatus(attr, "ReadOnly") setattr(obj, attr, value) elif isinstance(value, float): if attr not in obj.PropertiesList: - obj.addProperty("App::PropertyFloat", attr, "IFC") + obj.addProperty("App::PropertyFloat", attr, "IFC", locked=True) setattr(obj, attr, value) elif data_type == "boolean": if attr not in obj.PropertiesList: - obj.addProperty("App::PropertyBool", attr, "IFC") + obj.addProperty("App::PropertyBool", attr, "IFC", locked=True) if not value or value in ["UNKNOWN", "FALSE"]: value = False elif not isinstance(value, bool): @@ -688,15 +688,15 @@ def add_properties( elif isinstance(value, ifcopenshell.entity_instance): if links: if attr not in obj.PropertiesList: - obj.addProperty("App::PropertyLink", attr, "IFC") + obj.addProperty("App::PropertyLink", attr, "IFC", locked=True) elif isinstance(value, (list, tuple)) and value: if isinstance(value[0], ifcopenshell.entity_instance): if links: if attr not in obj.PropertiesList: - obj.addProperty("App::PropertyLinkList", attr, "IFC") + obj.addProperty("App::PropertyLinkList", attr, "IFC", locked=True) elif data_type == "enum": if attr not in obj.PropertiesList: - obj.addProperty("App::PropertyEnumeration", attr, "IFC") + obj.addProperty("App::PropertyEnumeration", attr, "IFC", locked=True) items = ifcopenshell.util.attribute.get_enum_items(attr_def) if value not in items: for v in ("UNDEFINED", "NOTDEFINED", "USERDEFINED"): @@ -711,14 +711,14 @@ def add_properties( setattr(obj, attr, value) setattr(obj, attr, items) elif attr in ["RefLongitude", "RefLatitude"]: - obj.addProperty("App::PropertyFloat", attr, "IFC") + obj.addProperty("App::PropertyFloat", attr, "IFC", locked=True) if value is not None: # convert from list of 4 ints value = value[0] + value[1]/60. + value[2]/3600. + value[3]/3600.e6 setattr(obj, attr, value) else: if attr not in obj.PropertiesList: - obj.addProperty("App::PropertyString", attr, "IFC") + obj.addProperty("App::PropertyString", attr, "IFC", locked=True) if value is not None: setattr(obj, attr, str(value)) # annotation properties @@ -726,14 +726,14 @@ def add_properties( axisdata = ifc_export.get_axis(ifcentity) if axisdata: if "Placement" not in obj.PropertiesList: - obj.addProperty("App::PropertyPlacement", "Placement", "Base") + obj.addProperty("App::PropertyPlacement", "Placement", "Base", locked=True) if "CustomText" in obj.PropertiesList: obj.setPropertyStatus("CustomText", "Hidden") obj.setExpression("CustomText", "AxisTag") if "Length" not in obj.PropertiesList: - obj.addProperty("App::PropertyLength","Length","Axis") + obj.addProperty("App::PropertyLength","Length","Axis", locked=True) if "Text" not in obj.PropertiesList: - obj.addProperty("App::PropertyStringList", "Text", "Base") + obj.addProperty("App::PropertyStringList", "Text", "Base", locked=True) obj.Text = [text.Literal] obj.Placement = ifc_export.get_placement(ifcentity.ObjectPlacement, ifcfile) obj.Length = axisdata[1] @@ -741,18 +741,18 @@ def add_properties( sectionplane = ifc_export.get_sectionplane(ifcentity) if sectionplane: if "Placement" not in obj.PropertiesList: - obj.addProperty("App::PropertyPlacement", "Placement", "Base") + obj.addProperty("App::PropertyPlacement", "Placement", "Base", locked=True) if "Depth" not in obj.PropertiesList: - obj.addProperty("App::PropertyLength","Depth","SectionPlane") + obj.addProperty("App::PropertyLength","Depth","SectionPlane", locked=True) obj.Placement = sectionplane[0] if len(sectionplane) > 3: obj.Depth = sectionplane[3] vobj = obj.ViewObject if vobj: if "DisplayLength" not in vobj.PropertiesList: - vobj.addProperty("App::PropertyLength","DisplayLength","SectionPlane") + vobj.addProperty("App::PropertyLength","DisplayLength","SectionPlane", locked=True) if "DisplayHeight" not in vobj.PropertiesList: - vobj.addProperty("App::PropertyLength","DisplayHeight","SectionPlane") + vobj.addProperty("App::PropertyLength","DisplayHeight","SectionPlane", locked=True) if len(sectionplane) > 1: vobj.DisplayLength = sectionplane[1] if len(sectionplane) > 2: @@ -761,11 +761,11 @@ def add_properties( dim = ifc_export.get_dimension(ifcentity) if dim and len(dim) >= 3: if "Start" not in obj.PropertiesList: - obj.addProperty("App::PropertyVectorDistance", "Start", "Base") + obj.addProperty("App::PropertyVectorDistance", "Start", "Base", locked=True) if "End" not in obj.PropertiesList: - obj.addProperty("App::PropertyVectorDistance", "End", "Base") + obj.addProperty("App::PropertyVectorDistance", "End", "Base", locked=True) if "Dimline" not in obj.PropertiesList: - obj.addProperty("App::PropertyVectorDistance", "Dimline", "Base") + obj.addProperty("App::PropertyVectorDistance", "Dimline", "Base", locked=True) obj.Start = dim[1] obj.End = dim[2] if len(dim) > 3: @@ -778,9 +778,9 @@ def add_properties( text = ifc_export.get_text(ifcentity) if text: if "Placement" not in obj.PropertiesList: - obj.addProperty("App::PropertyPlacement", "Placement", "Base") + obj.addProperty("App::PropertyPlacement", "Placement", "Base", locked=True) if "Text" not in obj.PropertiesList: - obj.addProperty("App::PropertyStringList", "Text", "Base") + obj.addProperty("App::PropertyStringList", "Text", "Base", locked=True) obj.Text = [text.Literal] obj.Placement = ifc_export.get_placement(ifcentity.ObjectPlacement, ifcfile) elif ifcentity.is_a("IfcControl"): diff --git a/src/Mod/BIM/utils/ifctree.py b/src/Mod/BIM/utils/ifctree.py index a9cd2ca899..a368680352 100644 --- a/src/Mod/BIM/utils/ifctree.py +++ b/src/Mod/BIM/utils/ifctree.py @@ -98,24 +98,24 @@ def create(ifcentity): if hasattr(obj, attr): continue elif isinstance(value, int): - obj.addProperty("App::PropertyInteger", attr, "IFC") + obj.addProperty("App::PropertyInteger", attr, "IFC", locked=True) setattr(obj, attr, value) elif isinstance(value, float): - obj.addProperty("App::PropertyFloat", attr, "IFC") + obj.addProperty("App::PropertyFloat", attr, "IFC", locked=True) setattr(obj, attr, value) elif isinstance(value, ifcopenshell.entity_instance): value = create(value) - obj.addProperty("App::PropertyLink", attr, "IFC") + obj.addProperty("App::PropertyLink", attr, "IFC", locked=True) setattr(obj, attr, value) elif isinstance(value, (list, tuple)) and value: if isinstance(value[0], ifcopenshell.entity_instance): nvalue = [] for elt in value: nvalue.append(create(elt)) - obj.addProperty("App::PropertyLinkList", attr, "IFC") + obj.addProperty("App::PropertyLinkList", attr, "IFC", locked=True) setattr(obj, attr, nvalue) else: - obj.addProperty("App::PropertyString", attr, "IFC") + obj.addProperty("App::PropertyString", attr, "IFC", locked=True) if value is not None: setattr(obj, attr, str(value)) for parent in ifcfile.get_inverse(ifcentity):