black format

This commit is contained in:
Andrej730
2023-03-16 16:06:41 +05:00
parent 35e748089b
commit fe0a98a44f
6 changed files with 9 additions and 17 deletions
@@ -1407,7 +1407,7 @@ class EditTextPopup(bpy.types.Operator):
return context.window_manager.invoke_props_dialog(self) return context.window_manager.invoke_props_dialog(self)
else: else:
bpy.ops.bim.edit_text() bpy.ops.bim.edit_text()
return {'FINISHED'} return {"FINISHED"}
class EditText(bpy.types.Operator, Operator): class EditText(bpy.types.Operator, Operator):
@@ -444,7 +444,7 @@ class BIMTextProperties(PropertyGroup):
) )
def get_text(self): def get_text(self):
text_attribute = self.attributes.get('Literal', None) text_attribute = self.attributes.get("Literal", None)
return text_attribute.string_value if text_attribute else self.text return text_attribute.string_value if text_attribute else self.text
@@ -385,7 +385,6 @@ class BIM_PT_text(Panel):
row.label(text=props.value) row.label(text=props.value)
class BIM_PT_annotation_utilities(Panel): class BIM_PT_annotation_utilities(Panel):
bl_idname = "BIM_PT_annotation_utilities" bl_idname = "BIM_PT_annotation_utilities"
bl_label = "Annotation" bl_label = "Annotation"
@@ -334,10 +334,7 @@ class BimToolUI:
row.label(text="", icon="EVENT_SHIFT") row.label(text="", icon="EVENT_SHIFT")
row.label(text="", icon="EVENT_E") row.label(text="", icon="EVENT_E")
row.operator("bim.hotkey", text="Edit Roof Path").hotkey = "S_E" row.operator("bim.hotkey", text="Edit Roof Path").hotkey = "S_E"
elif ( elif (TextData.is_loaded or not TextData.load()) and TextData.data["attributes"]:
(TextData.is_loaded or not TextData.load())
and TextData.data["attributes"]
):
row = cls.layout.row(align=True) row = cls.layout.row(align=True)
row.label(text="", icon="EVENT_SHIFT") row.label(text="", icon="EVENT_SHIFT")
row.label(text="", icon="EVENT_E") row.label(text="", icon="EVENT_E")
@@ -577,10 +574,7 @@ class Hotkey(bpy.types.Operator, tool.Ifc.Operator):
bpy.context.object.select_set(True) bpy.context.object.select_set(True)
bpy.ops.bim.enable_editing_roof_path() bpy.ops.bim.enable_editing_roof_path()
elif ( elif (TextData.is_loaded or not TextData.load()) and TextData.data["attributes"]:
(TextData.is_loaded or not TextData.load())
and TextData.data["attributes"]
):
bpy.context.object.select_set(True) bpy.context.object.select_set(True)
bpy.ops.bim.edit_text_popup() bpy.ops.bim.edit_text_popup()
@@ -564,7 +564,6 @@ class Drawing(blenderbim.core.tool.Drawing):
# or if the current font size is not present in classes # or if the current font size is not present in classes
# (except regular font size because it's default) # (except regular font size because it's default)
if different_font_sizes or (font_size_str not in classes_split and font_size_str != "regular"): if different_font_sizes or (font_size_str not in classes_split and font_size_str != "regular"):
classes_split = [c for c in classes_split if c not in FONT_SIZES] + [font_size_str] classes_split = [c for c in classes_split if c not in FONT_SIZES] + [font_size_str]
classes = " ".join(classes_split) classes = " ".join(classes_split)