ifcsverchok - operator to apply graph to Bonsai file

This commit is contained in:
Andrej730
2026-01-15 16:54:37 +05:00
parent 413530bb0a
commit 47e259ff2f
5 changed files with 51 additions and 0 deletions
+2
View File
@@ -297,11 +297,13 @@ class IFC_PT_write_file_panel(bpy.types.Panel):
def draw(self, context):
ng = context.space_data.node_tree
layout = self.layout
assert layout
row = layout.split(factor=0.2, align=True)
row = layout.row()
row2 = layout.row()
row.operator("ifc.sverchok_update_current", text="IFC Re-run all nodes")
row2.operator("ifc.write_file_panel")
layout.operator("bim.ifcsverchok_use_bonsai_file")
CLASSES = [IFC_Sv_UpdateCurrent, IFC_Sv_write_file, IFC_PT_write_file_panel]
+5
View File
@@ -18,6 +18,7 @@
from typing import Any, Union
import bonsai.tool as tool
import bpy
import ifcopenshell
import ifcopenshell.api
@@ -50,6 +51,8 @@ class SvIfcStore:
future = []
schema_identifiers = ["IFC4", "IFC2X3"]
use_bonsai_file = False
@staticmethod
def purge() -> None:
SvIfcStore.path = ""
@@ -95,6 +98,8 @@ class SvIfcStore:
@staticmethod
def get_file() -> ifcopenshell.file:
if SvIfcStore.use_bonsai_file:
return tool.Ifc.get()
if SvIfcStore.file is None:
SvIfcStore.create_boilerplate()
return SvIfcStore.file