mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-26 18:21:59 +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):
|
def add_drawings(cls, sheet):
|
||||||
sheet_builder = sheeter.SheetBuilder()
|
sheet_builder = sheeter.SheetBuilder()
|
||||||
sheet_builder.data_dir = bpy.context.scene.BIMProperties.data_dir
|
sheet_builder.data_dir = bpy.context.scene.BIMProperties.data_dir
|
||||||
sheet_reference = None
|
drawing_references = {}
|
||||||
drawing_names = []
|
drawing_names = []
|
||||||
for reference in cls.get_document_references(sheet):
|
for reference in cls.get_document_references(sheet):
|
||||||
reference_description = cls.get_reference_description(reference)
|
reference_description = cls.get_reference_description(reference)
|
||||||
if reference_description == "LAYOUT":
|
if reference_description == "DRAWING":
|
||||||
sheet_reference = reference
|
drawing_references[Path(reference.Location).stem] = reference
|
||||||
elif reference_description == "DRAWING":
|
|
||||||
drawing_names.append(Path(reference.Location).stem)
|
drawing_names.append(Path(reference.Location).stem)
|
||||||
for annotation in [e for e in tool.Ifc.get().by_type("IfcAnnotation") if e.ObjectType == "DRAWING"]:
|
for drawing_annotation in [e for e in tool.Ifc.get().by_type("IfcAnnotation") if e.ObjectType == "DRAWING"]:
|
||||||
if annotation.Name in drawing_names:
|
if drawing_annotation.Name in drawing_names:
|
||||||
sheet_builder.add_drawing(sheet_reference, annotation, sheet)
|
sheet_builder.add_drawing(drawing_references[drawing_annotation.Name], drawing_annotation, sheet)
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def delete_collection(cls, collection):
|
def delete_collection(cls, collection):
|
||||||
|
|||||||
Reference in New Issue
Block a user