BIM: prevent user to remove core properties

This commit is contained in:
Florian Foinant-Willig
2025-03-16 20:50:02 +01:00
committed by Kacper Donat
parent d5e2fdf8fd
commit 8a4c61ec5a
43 changed files with 568 additions and 551 deletions

View File

@@ -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: