mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-08-11 02:02:22 +00:00
bim.load_style - avoid writing to ifc every time
This commit is contained in:
@@ -464,6 +464,7 @@ class LoadStyles(bpy.types.Operator):
|
||||
def execute(self, context):
|
||||
style_type = self.style_type if self.style_type else context.scene.BIMStylesProperties.style_type
|
||||
core.load_styles(tool.Style, style_type=style_type)
|
||||
bonsai.bim.handler.refresh_ui_data()
|
||||
return {"FINISHED"}
|
||||
|
||||
|
||||
|
||||
@@ -525,7 +525,7 @@ class Style(bonsai.core.tool.Style):
|
||||
for style in styles:
|
||||
new = props.styles.add()
|
||||
new.ifc_definition_id = style.id()
|
||||
new.name = style.Name or "Unnamed"
|
||||
new["name"] = style.Name or "Unnamed" # Avoid writing to IFC through callback.
|
||||
new.ifc_class = style.is_a()
|
||||
for surface_style in getattr(style, "Styles", []) or []:
|
||||
new2 = new.style_classes.add()
|
||||
|
||||
Reference in New Issue
Block a user