Skip to content

Commit

Permalink
Fix bug where loading drawings didn't correctly link shared meshes (e…
Browse files Browse the repository at this point in the history
….g. from a type of an annotation)
  • Loading branch information
Moult committed Mar 30, 2024
1 parent 0065c5f commit ed79cbb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/blenderbim/blenderbim/bim/import_ifc.py
Original file line number Diff line number Diff line change
Expand Up @@ -1164,6 +1164,9 @@ def create_product(

return obj

def load_existing_meshes(self) -> None:
self.meshes.update({m.name: m for m in bpy.data.meshes})

def get_representation_item_material_name(self, item):
if not item.StyledByItem:
return
Expand Down
1 change: 1 addition & 0 deletions src/blenderbim/blenderbim/tool/drawing.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,6 +607,7 @@ def import_annotations_in_group(cls, group: ifcopenshell.entity_instance) -> Non
ifc_importer.file = tool.Ifc.get()
ifc_importer.calculate_unit_scale()
ifc_importer.process_context_filter()
ifc_importer.load_existing_meshes()
ifc_importer.material_creator.load_existing_materials()
ifc_importer.create_generic_elements(elements)
for obj in ifc_importer.added_data.values():
Expand Down

0 comments on commit ed79cbb

Please sign in to comment.