mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-21 14:23:53 +00:00
black format
This commit is contained in:
@@ -2032,9 +2032,9 @@ class UnassignRepresentationItemStyle(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
|
|
||||||
# Retrieve styles applied to the active representation item
|
# Retrieve styles applied to the active representation item
|
||||||
active_styles = set()
|
active_styles = set()
|
||||||
if hasattr(active_representation_item, 'StyledByItem'):
|
if hasattr(active_representation_item, "StyledByItem"):
|
||||||
for styled_by_item in 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)
|
active_styles.update(styled_by_item.Styles)
|
||||||
|
|
||||||
if not active_styles:
|
if not active_styles:
|
||||||
@@ -2063,9 +2063,9 @@ class UnassignRepresentationItemStyle(bpy.types.Operator, tool.Ifc.Operator):
|
|||||||
if representation_item:
|
if representation_item:
|
||||||
# Retrieve styles for the current representation item
|
# Retrieve styles for the current representation item
|
||||||
styles = set()
|
styles = set()
|
||||||
if hasattr(representation_item, 'StyledByItem'):
|
if hasattr(representation_item, "StyledByItem"):
|
||||||
for styled_by_item in 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)
|
styles.update(styled_by_item.Styles)
|
||||||
|
|
||||||
# Unassign matching 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.disable_editing_representation_items()
|
||||||
bpy.ops.bim.enable_editing_representation_items()
|
bpy.ops.bim.enable_editing_representation_items()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
class EnableEditingRepresentationItemShapeAspect(bpy.types.Operator, tool.Ifc.Operator):
|
class EnableEditingRepresentationItemShapeAspect(bpy.types.Operator, tool.Ifc.Operator):
|
||||||
bl_idname = "bim.enable_editing_representation_item_shape_aspect"
|
bl_idname = "bim.enable_editing_representation_item_shape_aspect"
|
||||||
|
|||||||
@@ -1160,7 +1160,7 @@ class Blender(bonsai.core.tool.Blender):
|
|||||||
def scale_font_size(cls, size):
|
def scale_font_size(cls, size):
|
||||||
default_dpi = 72
|
default_dpi = 72
|
||||||
default_pixel_size = 1.0
|
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 = bpy.context.preferences.system
|
||||||
system_scale = (system.dpi * system.pixel_size)
|
system_scale = system.dpi * system.pixel_size
|
||||||
return (system_scale / default_scale) * size
|
return (system_scale / default_scale) * size
|
||||||
|
|||||||
@@ -1737,8 +1737,7 @@ class Drawing(bonsai.core.tool.Drawing):
|
|||||||
if product:
|
if product:
|
||||||
product_obj = tool.Ifc.get_object(product)
|
product_obj = tool.Ifc.get_object(product)
|
||||||
product_obj.select_set(True)
|
product_obj.select_set(True)
|
||||||
context.view_layer.objects.active = product_obj
|
context.view_layer.objects.active = product_obj
|
||||||
|
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def is_drawing_active(cls) -> bool:
|
def is_drawing_active(cls) -> bool:
|
||||||
|
|||||||
@@ -132,6 +132,7 @@ def get_subtypes(
|
|||||||
print(ifcopenshell.util.schema.get_subtypes(declaration))
|
print(ifcopenshell.util.schema.get_subtypes(declaration))
|
||||||
[<entity IfcFlowSegment>, <entity IfcCableCarrierSegment>, ..., <entity IfcPipeSegment>]
|
[<entity IfcFlowSegment>, <entity IfcCableCarrierSegment>, ..., <entity IfcPipeSegment>]
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def get_classes(decl):
|
def get_classes(decl):
|
||||||
results = []
|
results = []
|
||||||
if not decl.is_abstract():
|
if not decl.is_abstract():
|
||||||
|
|||||||
Reference in New Issue
Block a user