ifcsverchok bonsai integration - support editing parametric properties from UI

Demo - https://files.catbox.moe/extsxf.mp4

But now it requires ifcsverchok graph to be nested inside a subgroup because we need a way to indicate which graph parameters are important, so user can modify them from Parametric Geometry tab without actually explicitly opening sverchok graph.
This commit is contained in:
Andrej730
2026-01-21 16:44:07 +05:00
parent c33969d589
commit 784415e464
2 changed files with 19 additions and 1 deletions
+9
View File
@@ -694,6 +694,15 @@ class BIM_PT_external_parametric_geometry(bpy.types.Panel):
print(res)
layout.label(text=f"Error Updating from Graph, See System Console", icon="ERROR")
layout.label(text="Parameters:")
box = layout.box()
group_node = tool.Model.get_ifcsverchok_group_node(props.sverchok_nodes)
node_tree = group_node.node_tree
for socket, interface_socket in zip(group_node.inputs, node_tree.sockets("INPUT")):
socket.draw_group_property(box, socket.name, interface_socket)
def draw_door_properties(layout: bpy.types.UILayout, props: module_prop.BIMDoorProperties) -> None:
"""Draw door properties UI (shared between properties panel and preferences)."""
+10 -1
View File
@@ -67,6 +67,7 @@ if TYPE_CHECKING:
BIMExternalParametricGeometryProperties,
BIMPolylineProperties,
)
from sverchok.core.node_group import SvGroupTreeNode
class Model(bonsai.core.tool.Model):
@@ -2565,13 +2566,21 @@ class Model(bonsai.core.tool.Model):
return [s for s in group_node.inputs if s.type != "GEOMETRY"]
@classmethod
def get_ifcsverchok_group_node(cls, node_tree: sverchok.node_tree.SverchCustomTree) -> SvGroupTreeNode:
from sverchok.core.node_group import SvGroupTreeNode
return next(n for n in node_tree.nodes if isinstance(n, SvGroupTreeNode) and n.label == "BBIM_EPG")
@classmethod
def get_ifcsverchok_shape_output(
cls, node_tree: sverchok.node_tree.SverchCustomTree
) -> ifcsverchok.nodes.ifc.shape_builder.shape_output.SvSbShapeOutput:
from ifcsverchok.nodes.ifc.shape_builder.shape_output import SvSbShapeOutput
return next(n for n in node_tree.nodes if isinstance(n, SvSbShapeOutput))
group_node = cls.get_ifcsverchok_group_node(node_tree)
subtree = group_node.node_tree
return next(n for n in subtree.nodes if isinstance(n, SvSbShapeOutput))
@classmethod
def update_mesh_from_sverchok(