black format

This commit is contained in:
Andrej730
2024-09-06 11:10:19 +05:00
parent 6ebec7e0e5
commit f27bb6effe
4 changed files with 9 additions and 11 deletions
@@ -2032,9 +2032,9 @@ class UnassignRepresentationItemStyle(bpy.types.Operator, tool.Ifc.Operator):
# Retrieve styles applied to the active representation item
active_styles = set()
if hasattr(active_representation_item, 'StyledByItem'):
if hasattr(active_representation_item, "StyledByItem"):
for styled_by_item in active_representation_item.StyledByItem:
if hasattr(styled_by_item, 'Styles'):
if hasattr(styled_by_item, "Styles"):
active_styles.update(styled_by_item.Styles)
if not active_styles:
@@ -2063,9 +2063,9 @@ class UnassignRepresentationItemStyle(bpy.types.Operator, tool.Ifc.Operator):
if representation_item:
# Retrieve styles for the current representation item
styles = set()
if hasattr(representation_item, 'StyledByItem'):
if hasattr(representation_item, "StyledByItem"):
for styled_by_item in representation_item.StyledByItem:
if hasattr(styled_by_item, 'Styles'):
if hasattr(styled_by_item, "Styles"):
styles.update(styled_by_item.Styles)
# Unassign matching styles
@@ -2079,8 +2079,6 @@ class UnassignRepresentationItemStyle(bpy.types.Operator, tool.Ifc.Operator):
bpy.ops.bim.disable_editing_representation_items()
bpy.ops.bim.enable_editing_representation_items()
class EnableEditingRepresentationItemShapeAspect(bpy.types.Operator, tool.Ifc.Operator):
bl_idname = "bim.enable_editing_representation_item_shape_aspect"
+3 -3
View File
@@ -1160,7 +1160,7 @@ class Blender(bonsai.core.tool.Blender):
def scale_font_size(cls, size):
default_dpi = 72
default_pixel_size = 1.0
default_scale = (default_dpi * default_pixel_size)
default_scale = default_dpi * default_pixel_size
system = bpy.context.preferences.system
system_scale = (system.dpi * system.pixel_size)
return (system_scale / default_scale) * size
system_scale = system.dpi * system.pixel_size
return (system_scale / default_scale) * size
+1 -2
View File
@@ -1737,8 +1737,7 @@ class Drawing(bonsai.core.tool.Drawing):
if product:
product_obj = tool.Ifc.get_object(product)
product_obj.select_set(True)
context.view_layer.objects.active = product_obj
context.view_layer.objects.active = product_obj
@classmethod
def is_drawing_active(cls) -> bool:
@@ -132,6 +132,7 @@ def get_subtypes(
print(ifcopenshell.util.schema.get_subtypes(declaration))
[<entity IfcFlowSegment>, <entity IfcCableCarrierSegment>, ..., <entity IfcPipeSegment>]
"""
def get_classes(decl):
results = []
if not decl.is_abstract():