Fix error editing curves based representations #5499

KeyError: 'bpy_struct[key]: key "ios_edges_item_ids" not found'

It's still not possible to edit curve representations, just fixing an error trying to import representation items.
This commit is contained in:
Andrej730
2024-10-04 18:15:39 +05:00
parent 13a6d5b64a
commit ca9681568c
+6
View File
@@ -1360,6 +1360,12 @@ class IfcImporter:
v2 = vertices[edge[1]]
polyline.points.add(1)
polyline.points[-1].co = mathutils.Vector(v2)
# TODO: remove error handling after we update build in Bonsai.
try:
edges_item_ids = ifcopenshell.util.shape.get_edges_representation_item_ids(geometry).tolist()
except AttributeError:
edges_item_ids = []
curve["ios_edges_item_ids"] = edges_item_ids
return curve
def create_mesh(