mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-13 10:57:49 +00:00
fix sheet regeneration missing drawing Identifier
Was passing LAYOUT document reference to sheeter instead of DRAWING document reference
This commit is contained in:
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user