Skip to content

Commit 2edd1a5

Browse files
committed
Black
1 parent 08dfcea commit 2edd1a5

File tree

3 files changed

+57
-16
lines changed

3 files changed

+57
-16
lines changed

src/bonsai/bonsai/bim/module/bsdd/ui.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ def draw(self, context):
8383
row = self.layout.row()
8484
row.operator("bim.load_bsdd_dictionaries")
8585

86+
8687
class BIM_UL_bsdd_dictionaries(UIList):
8788
def draw_item(
8889
self,

src/bonsai/bonsai/bim/module/cad/workspace.py

Lines changed: 53 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -106,23 +106,37 @@ def draw_settings(
106106
)
107107

108108
row = layout.row(align=True)
109-
add_layout_hotkey_operator(row, "Extend", "S_E", bpy.ops.bim.cad_trim_extend.__doc__.split("\n", 1)[1].strip(), ui_context)
109+
add_layout_hotkey_operator(
110+
row, "Extend", "S_E", bpy.ops.bim.cad_trim_extend.__doc__.split("\n", 1)[1].strip(), ui_context
111+
)
110112
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
111113
add_layout_hotkey_operator(
112114
row, "Join", "S_T", bpy.ops.bim.cad_mitre.__doc__.split("\n", 1)[1].strip(), ui_context
113115
)
114116
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
115-
add_layout_hotkey_operator(row, "Fillet", "S_F", bpy.ops.bim.add_ifcarcindex_fillet.__doc__.split("\n", 1)[1].strip(), ui_context)
117+
add_layout_hotkey_operator(
118+
row, "Fillet", "S_F", bpy.ops.bim.add_ifcarcindex_fillet.__doc__.split("\n", 1)[1].strip(), ui_context
119+
)
116120
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
117-
add_layout_hotkey_operator(row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__.split("\n", 1)[1].strip(), ui_context)
121+
add_layout_hotkey_operator(
122+
row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__.split("\n", 1)[1].strip(), ui_context
123+
)
118124
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
119-
add_layout_hotkey_operator(row, "Rectangle", "S_R", bpy.ops.bim.add_rectangle.__doc__.split("\n", 1)[1].strip(), ui_context)
125+
add_layout_hotkey_operator(
126+
row, "Rectangle", "S_R", bpy.ops.bim.add_rectangle.__doc__.split("\n", 1)[1].strip(), ui_context
127+
)
120128
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
121-
add_layout_hotkey_operator(row, "Circle", "S_C", bpy.ops.bim.add_ifccircle.__doc__.split("\n", 1)[1].strip(), ui_context)
129+
add_layout_hotkey_operator(
130+
row, "Circle", "S_C", bpy.ops.bim.add_ifccircle.__doc__.split("\n", 1)[1].strip(), ui_context
131+
)
122132
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
123-
add_layout_hotkey_operator(row, "3-Point Arc", "S_V", bpy.ops.bim.set_arc_index.__doc__.split("\n", 1)[1].strip(), ui_context)
133+
add_layout_hotkey_operator(
134+
row, "3-Point Arc", "S_V", bpy.ops.bim.set_arc_index.__doc__.split("\n", 1)[1].strip(), ui_context
135+
)
124136
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
125-
add_layout_hotkey_operator(row, "Reset Vertex", "S_X", bpy.ops.bim.reset_vertex.__doc__.split("\n", 1)[1].strip(), ui_context)
137+
add_layout_hotkey_operator(
138+
row, "Reset Vertex", "S_X", bpy.ops.bim.reset_vertex.__doc__.split("\n", 1)[1].strip(), ui_context
139+
)
126140

127141
elif (
128142
isinstance(data, tool.Geometry.TYPES_WITH_MESH_PROPERTIES)
@@ -132,15 +146,21 @@ def draw_settings(
132146
layout, "Edit Axis", "bim.edit_extrusion_axis", "bim.disable_editing_extrusion_axis", ui_context
133147
)
134148
row = layout.row(align=True)
135-
add_layout_hotkey_operator(row, "Extend", "S_E", bpy.ops.bim.cad_trim_extend.__doc__.split("\n", 1)[1].strip(), ui_context)
149+
add_layout_hotkey_operator(
150+
row, "Extend", "S_E", bpy.ops.bim.cad_trim_extend.__doc__.split("\n", 1)[1].strip(), ui_context
151+
)
136152
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
137153
add_layout_hotkey_operator(
138154
row, "Join", "S_T", bpy.ops.bim.cad_mitre.__doc__.split("\n", 1)[1].strip(), ui_context
139155
)
140156
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
141-
add_layout_hotkey_operator(row, "Fillet", "S_F", bpy.ops.bim.cad_fillet.__doc__.split("\n", 1)[1].strip(), ui_context)
157+
add_layout_hotkey_operator(
158+
row, "Fillet", "S_F", bpy.ops.bim.cad_fillet.__doc__.split("\n", 1)[1].strip(), ui_context
159+
)
142160
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
143-
add_layout_hotkey_operator(row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__.split("\n", 1)[1].strip(), ui_context)
161+
add_layout_hotkey_operator(
162+
row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__.split("\n", 1)[1].strip(), ui_context
163+
)
144164

145165
else:
146166
if (
@@ -168,19 +188,37 @@ def draw_settings(
168188
add_layout_hotkey_operator(row, "Set Gable Roof Angle", "S_R", "Set Gable Roof Angle", ui_context)
169189

170190
row = layout.row(align=True)
171-
add_layout_hotkey_operator(row, "Extend", "S_E", bpy.ops.bim.cad_trim_extend.__doc__.split("\n", 1)[1].strip(), ui_context)
191+
add_layout_hotkey_operator(
192+
row, "Extend", "S_E", bpy.ops.bim.cad_trim_extend.__doc__.split("\n", 1)[1].strip(), ui_context
193+
)
172194
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
173195
add_layout_hotkey_operator(
174196
row, "Join", "S_T", bpy.ops.bim.cad_mitre.__doc__.split("\n", 1)[1].strip(), ui_context
175197
)
176198
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
177-
add_layout_hotkey_operator(row, "Fillet", "S_F", bpy.ops.bim.add_ifcarcindex_fillet.__doc__.split("\n", 1)[1].strip(), ui_context)
199+
add_layout_hotkey_operator(
200+
row, "Fillet", "S_F", bpy.ops.bim.add_ifcarcindex_fillet.__doc__.split("\n", 1)[1].strip(), ui_context
201+
)
178202
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
179-
add_layout_hotkey_operator(row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__.split("\n", 1)[1].strip(), ui_context)
203+
add_layout_hotkey_operator(
204+
row, "Offset", "S_O", bpy.ops.bim.cad_offset.__doc__.split("\n", 1)[1].strip(), ui_context
205+
)
180206
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
181-
add_layout_hotkey_operator(row, "2-Point Arc", "S_C", bpy.ops.bim.cad_arc_from_2_points.__doc__.split("\n", 1)[1].strip(), ui_context)
207+
add_layout_hotkey_operator(
208+
row,
209+
"2-Point Arc",
210+
"S_C",
211+
bpy.ops.bim.cad_arc_from_2_points.__doc__.split("\n", 1)[1].strip(),
212+
ui_context,
213+
)
182214
row = row if ui_context == "TOOL_HEADER" else layout.row(align=True)
183-
add_layout_hotkey_operator(row, "3-Point Arc", "S_V", bpy.ops.bim.cad_arc_from_3_points.__doc__.split("\n", 1)[1].strip(), ui_context)
215+
add_layout_hotkey_operator(
216+
row,
217+
"3-Point Arc",
218+
"S_V",
219+
bpy.ops.bim.cad_arc_from_3_points.__doc__.split("\n", 1)[1].strip(),
220+
ui_context,
221+
)
184222

185223

186224
class CadHotkey(bpy.types.Operator):

src/bonsai/bonsai/core/material.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,9 @@ def assign_material(
143143
material_tool.add_material_to_set(material_set=material, material=default_material)
144144
elif material_tool.is_a_material_set(assigned_material):
145145
material_tool.add_material_to_set(material_set=assigned_material, material=material)
146-
material_tool.ensure_material_assigned(elements=[element], material_type=element_material_type, material=material)
146+
material_tool.ensure_material_assigned(
147+
elements=[element], material_type=element_material_type, material=material
148+
)
147149

148150

149151
def unassign_material(ifc: type[tool.Ifc], material_tool: type[tool.Material], objects: list[bpy.types.Object]) -> None:

0 commit comments

Comments
 (0)