Added checkboxes to drawing list to mark multiple selected drawings

Checkboxes affect the drawings that will be used when you shift click "Create drawing", "Open Drawing", "Remove Drawing". Previously those opeartors were always applying the action to all drawings.

Also added option to remove selected drawings with shift+click to "Remove Drawing" and added new operator "Select all drawings" to select drawings in one click (you can shift click it to delsect all drawings).

Example - https://i.imgur.com/GAGghu5.png
This commit is contained in:
Andrej730
2023-04-11 15:27:03 +05:00
parent 759a5a6b86
commit 37949a0d80
6 changed files with 72 additions and 11 deletions
@@ -542,6 +542,9 @@ class Drawing(blenderbim.core.tool.Drawing):
@classmethod
def import_drawings(cls):
current_drawings_selection = {
d.ifc_definition_id: d.is_selected for d in bpy.context.scene.DocProperties.drawings
}
bpy.context.scene.DocProperties.drawings.clear()
drawings = [e for e in tool.Ifc.get().by_type("IfcAnnotation") if e.ObjectType == "DRAWING"]
for drawing in drawings:
@@ -549,6 +552,7 @@ class Drawing(blenderbim.core.tool.Drawing):
new.ifc_definition_id = drawing.id()
new.name = drawing.Name or "Unnamed"
new.target_view = cls.get_drawing_target_view(drawing)
new.is_selected = current_drawings_selection.get(drawing.id(), True)
@classmethod
def import_schedules(cls):