fix sheet regeneration missing drawing Identifier

Was passing LAYOUT document reference to sheeter instead of
DRAWING document reference
This commit is contained in:
Bruno Postle
2024-04-24 23:05:44 +01:00
parent f41fbf24c3
commit c0b4e099af
+6 -7
View File
@@ -251,17 +251,16 @@ class Drawing(blenderbim.core.tool.Drawing):
def add_drawings(cls, sheet):
sheet_builder = sheeter.SheetBuilder()
sheet_builder.data_dir = bpy.context.scene.BIMProperties.data_dir
sheet_reference = None
drawing_references = {}
drawing_names = []
for reference in cls.get_document_references(sheet):
reference_description = cls.get_reference_description(reference)
if reference_description == "LAYOUT":
sheet_reference = reference
elif reference_description == "DRAWING":
if reference_description == "DRAWING":
drawing_references[Path(reference.Location).stem] = reference
drawing_names.append(Path(reference.Location).stem)
for annotation in [e for e in tool.Ifc.get().by_type("IfcAnnotation") if e.ObjectType == "DRAWING"]:
if annotation.Name in drawing_names:
sheet_builder.add_drawing(sheet_reference, annotation, sheet)
for drawing_annotation in [e for e in tool.Ifc.get().by_type("IfcAnnotation") if e.ObjectType == "DRAWING"]:
if drawing_annotation.Name in drawing_names:
sheet_builder.add_drawing(drawing_references[drawing_annotation.Name], drawing_annotation, sheet)
@classmethod
def delete_collection(cls, collection):