Minor bug fixes with error message when selecting objects in layers without objects

This commit is contained in:
Dion Moult
2023-10-12 22:40:54 +11:00
parent ca2ae36d41
commit 55a7a72e61
2 changed files with 3 additions and 2 deletions
@@ -1766,7 +1766,8 @@ class EnableEditingRepresentationItems(bpy.types.Operator, Operator):
for style in styles:
if style.is_a("IfcSurfaceStyle"):
new.surface_style = style.Name or "Unnamed"
break
elif inverse.is_a("IfcPresentationLayerAssignment"):
new.layer = inverse.Name or "Unnamed"
class DisableEditingRepresentationItems(bpy.types.Operator, Operator):
@@ -63,7 +63,7 @@ class EnableEditingLayer(bpy.types.Operator):
def execute(self, context):
props = context.scene.BIMLayerProperties
props.layer_attributes.clear()
blenderbim.bim.helper.import_attributes(tool.Ifc.get().by_id(self.layer), props.layer_attributes)
blenderbim.bim.helper.import_attributes2(tool.Ifc.get().by_id(self.layer), props.layer_attributes)
props.active_layer_id = self.layer
return {"FINISHED"}