Use active camera drawing id for bim.create_drawing #4581

There was inconsistency between .poll and .execute on what use as active drawing.
This commit is contained in:
Andrej730
2024-05-03 16:00:27 +05:00
parent 16b0b1c3a5
commit 93f8638a94
@@ -220,11 +220,12 @@ class CreateDrawing(bpy.types.Operator):
def execute(self, context):
self.props = context.scene.DocProperties
active_drawing_id = context.scene.camera.BIMObjectProperties.ifc_definition_id
if self.print_all:
original_drawing_id = self.props.active_drawing_id
original_drawing_id = active_drawing_id
drawings_to_print = [d.ifc_definition_id for d in self.props.drawings if d.is_selected and d.is_drawing]
else:
drawings_to_print = [self.props.active_drawing_id]
drawings_to_print = [active_drawing_id]
for drawing_i, drawing_id in enumerate(drawings_to_print):
self.drawing_index = drawing_i