Representation UI - show IfcTopologyRepresentation #4038

Now it will show representation items count and will load representation items for IfcTopologyRepresentations.
This commit is contained in:
Andrej730
2024-09-09 15:18:07 +05:00
parent 6da7e18f50
commit 2d988ac445
2 changed files with 4 additions and 2 deletions
@@ -161,7 +161,8 @@ class RepresentationItemsData:
assert obj
element = tool.Geometry.get_active_representation(obj)
if element:
if not element.is_a("IfcShapeRepresentation"):
# IfcShapeRepresentation or IfcTopologyRepresentation.
if not element.is_a("IfcShapeModel"):
return 0
queue = list(element.Items)
while queue:
@@ -1855,7 +1855,8 @@ class EnableEditingRepresentationItems(bpy.types.Operator, tool.Ifc.Operator):
if bpy.context.active_object.data and hasattr(bpy.context.active_object.data, "BIMMeshProperties"):
active_representation_id = bpy.context.active_object.data.BIMMeshProperties.ifc_definition_id
element = tool.Ifc.get().by_id(active_representation_id)
if not element.is_a("IfcShapeRepresentation"):
# IfcShapeRepresentation or IfcTopologyRepresentation.
if not element.is_a("IfcShapeModel"):
return
queue = list(element.Items)
while queue: