diff --git a/src/bonsai/bonsai/bim/module/aggregate/operator.py b/src/bonsai/bonsai/bim/module/aggregate/operator.py index ad7ac65312..e35b982d65 100644 --- a/src/bonsai/bonsai/bim/module/aggregate/operator.py +++ b/src/bonsai/bonsai/bim/module/aggregate/operator.py @@ -330,8 +330,8 @@ class BIM_OT_select_aggregate(bpy.types.Operator): if not result: result = query else: - result += f' + {query}' - + result += f" + {query}" + if result: bpy.context.window_manager.clipboard = result self.report({"INFO"}, f"({result}) was copied to the clipboard.") diff --git a/src/bonsai/bonsai/bim/module/drawing/operator.py b/src/bonsai/bonsai/bim/module/drawing/operator.py index 6250485b5e..5077b0bbf0 100644 --- a/src/bonsai/bonsai/bim/module/drawing/operator.py +++ b/src/bonsai/bonsai/bim/module/drawing/operator.py @@ -935,14 +935,14 @@ class CreateDrawing(bpy.types.Operator): # Add target_view and scale classes to the parent group from IFC data if group is not None: existing_classes = group.get("class", "").split() - + # Add target_view class - if hasattr(self, 'cprops') and getattr(self.cprops, "target_view", None): + if hasattr(self, "cprops") and getattr(self.cprops, "target_view", None): target_view_class = tool.Drawing.canonicalise_class_name(str(self.cprops.target_view)) target_view_full_class = f"target-view-{target_view_class}" if target_view_full_class not in existing_classes: existing_classes.append(target_view_full_class) - + # Add scale class from EPset_Drawing.Scale drawing_pset = ifcopenshell.util.element.get_pset(self.camera_element, "EPset_Drawing") if drawing_pset and drawing_pset.get("Scale"): @@ -954,7 +954,7 @@ class CreateDrawing(bpy.types.Operator): scale_full_class = f"scale-{scale_class}" if scale_full_class not in existing_classes: existing_classes.append(scale_full_class) - + group.set("class", " ".join(existing_classes)) if self.cprops.cut_mode == "BISECT": diff --git a/src/bonsai/bonsai/bim/module/drawing/svgwriter.py b/src/bonsai/bonsai/bim/module/drawing/svgwriter.py index 96fe593a99..37d39e502f 100644 --- a/src/bonsai/bonsai/bim/module/drawing/svgwriter.py +++ b/src/bonsai/bonsai/bim/module/drawing/svgwriter.py @@ -208,7 +208,7 @@ class SvgWriter: predefined_type = ifcopenshell.util.element.get_predefined_type(element) # Return 0 for FILLAREA to draw them first, 1 for everything else return 0 if predefined_type == "FILL_AREA" else 1 - + annotations = sorted(annotations, key=sort_key) for element in annotations: