mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-12 14:33:28 +00:00
ifcsverchok - experimenting with shape builder nodes
This commit is contained in:
@@ -81,7 +81,7 @@ ensure_addons_are_enabled("bonsai", "sverchok")
|
||||
from sverchok.ui.nodeview_space_menu import add_node_menu
|
||||
|
||||
|
||||
def nodes_index():
|
||||
def nodes_index() -> list[tuple[str, list[tuple[str, str]]]]:
|
||||
return [
|
||||
(
|
||||
"IFC",
|
||||
@@ -111,15 +111,24 @@ def nodes_index():
|
||||
("ifc.create_project", "SvIfcCreateProject"),
|
||||
("ifc.quick_project_setup", "SvIfcQuickProjectSetup"),
|
||||
],
|
||||
)
|
||||
),
|
||||
(
|
||||
"IFC Shape Builder",
|
||||
[
|
||||
("ifc.shape_builder.rectangle", "SvIfcSbRectangle"),
|
||||
("ifc.shape_builder.extrude", "SvIfcSbExtrude"),
|
||||
("ifc.shape_builder.representation", "SvIfcSbRepresentation"),
|
||||
("ifc.shape_builder.test", "SvIfcSbTest"),
|
||||
],
|
||||
),
|
||||
]
|
||||
|
||||
|
||||
def make_node_categories() -> list[dict[str, list[str]]]:
|
||||
node_categories = [{}]
|
||||
node_categories: list[dict[str, list[str]]] = []
|
||||
for category, nodes in nodes_index():
|
||||
nodes = [node_name for idname, node_name in nodes]
|
||||
node_categories[0][category] = nodes
|
||||
node_categories.append({category: nodes})
|
||||
return node_categories
|
||||
|
||||
|
||||
@@ -156,11 +165,11 @@ from ifcsverchok.ifcstore import SvIfcStore
|
||||
class IFC_Sv_UpdateCurrent(bpy.types.Operator):
|
||||
"""Update current Sverchok node tree.
|
||||
|
||||
Will reset transient IFC file.
|
||||
"""
|
||||
Will reset transient IFC file"""
|
||||
|
||||
bl_idname = "ifc.sverchok_update_current"
|
||||
bl_label = "Update Current Node Tree"
|
||||
# bl_description = "Update current Sverchok node tree, resetting transient IFC file."
|
||||
bl_options = {"REGISTER", "UNDO", "INTERNAL"}
|
||||
|
||||
node_group: bpy.props.StringProperty(default="")
|
||||
|
||||
Reference in New Issue
Block a user