mirror of
https://github.com/IfcOpenShell/IfcOpenShell.git
synced 2026-09-09 13:52:23 +00:00
ifcsverchok - add/update node descriptions
This commit is contained in:
@@ -147,7 +147,10 @@ from ifcsverchok.ifcstore import SvIfcStore
|
|||||||
|
|
||||||
|
|
||||||
class IFC_Sv_UpdateCurrent(bpy.types.Operator):
|
class IFC_Sv_UpdateCurrent(bpy.types.Operator):
|
||||||
"""Update current Sverchok node tree"""
|
"""Update current Sverchok node tree.
|
||||||
|
|
||||||
|
Will reset transient IFC file.
|
||||||
|
"""
|
||||||
|
|
||||||
bl_idname = "ifc.sverchok_update_current"
|
bl_idname = "ifc.sverchok_update_current"
|
||||||
bl_label = "Update Current Node Tree"
|
bl_label = "Update Current Node Tree"
|
||||||
@@ -181,7 +184,7 @@ class IFC_Sv_write_file(bpy.types.Operator):
|
|||||||
bl_idname = "ifc.write_file_panel"
|
bl_idname = "ifc.write_file_panel"
|
||||||
bl_label = "Write File"
|
bl_label = "Write File"
|
||||||
bl_options = {"REGISTER", "UNDO"}
|
bl_options = {"REGISTER", "UNDO"}
|
||||||
bl_description = "File path to write to."
|
bl_description = "Save transient IFC file to the provided path."
|
||||||
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
filepath: bpy.props.StringProperty(subtype="FILE_PATH")
|
||||||
filter_glob: bpy.props.StringProperty(default="*.ifc", options={"HIDDEN"})
|
filter_glob: bpy.props.StringProperty(default="*.ifc", options={"HIDDEN"})
|
||||||
node_group: bpy.props.StringProperty(default="")
|
node_group: bpy.props.StringProperty(default="")
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ from sverchok.data_structure import updateNode
|
|||||||
class SvIfcAdd(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
class SvIfcAdd(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
||||||
bl_idname = "SvIfcAdd"
|
bl_idname = "SvIfcAdd"
|
||||||
bl_label = "IFC Add"
|
bl_label = "IFC Add"
|
||||||
|
bl_description = "Add an entity to the provided IFC file."
|
||||||
file: StringProperty(name="file", update=updateNode)
|
file: StringProperty(name="file", update=updateNode)
|
||||||
entity: StringProperty(name="entity", update=updateNode)
|
entity: StringProperty(name="entity", update=updateNode)
|
||||||
|
|
||||||
|
|||||||
@@ -36,6 +36,7 @@ from sverchok.data_structure import updateNode, flatten_data
|
|||||||
class SvIfcAddPset(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
class SvIfcAddPset(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
||||||
bl_idname = "SvIfcAddPset"
|
bl_idname = "SvIfcAddPset"
|
||||||
bl_label = "IFC Add Pset"
|
bl_label = "IFC Add Pset"
|
||||||
|
bl_description = "Add/edit a property set for the provided element ids in the transient IFC file."
|
||||||
Name: StringProperty(
|
Name: StringProperty(
|
||||||
name="Name",
|
name="Name",
|
||||||
description="Name of the property set. Eg. Pset_WallCommon.",
|
description="Name of the property set. Eg. Pset_WallCommon.",
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ from mathutils import Matrix
|
|||||||
class SvIfcBMeshToIfcRepr(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
class SvIfcBMeshToIfcRepr(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
||||||
"""
|
"""
|
||||||
Triggers: BMesh to Ifc Repr
|
Triggers: BMesh to Ifc Repr
|
||||||
Tooltip: Blender mesh to Ifc Shape Representation
|
Tooltip: Add Blender mesh objects as IfcShapeRepresentations
|
||||||
|
to the transient IFC file.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
bl_idname = "SvIfcBMeshToIfcRepr"
|
bl_idname = "SvIfcBMeshToIfcRepr"
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ from sverchok.data_structure import updateNode, flatten_data
|
|||||||
class SvIfcByGuid(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
class SvIfcByGuid(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
||||||
bl_idname = "SvIfcByGuid"
|
bl_idname = "SvIfcByGuid"
|
||||||
bl_label = "IFC By Guid"
|
bl_label = "IFC By Guid"
|
||||||
|
bl_description = "Get IFC elements by guid from the transient IFC file."
|
||||||
n_id: StringProperty(default="")
|
n_id: StringProperty(default="")
|
||||||
guid: StringProperty(name="Guid(s)", update=updateNode)
|
guid: StringProperty(name="Guid(s)", update=updateNode)
|
||||||
id_iter = itertools.count()
|
id_iter = itertools.count()
|
||||||
|
|||||||
@@ -19,6 +19,7 @@
|
|||||||
|
|
||||||
import bpy
|
import bpy
|
||||||
import ifcsverchok.helper
|
import ifcsverchok.helper
|
||||||
|
import ifcsverchok.helper as helper
|
||||||
from ifcsverchok.ifcstore import SvIfcStore
|
from ifcsverchok.ifcstore import SvIfcStore
|
||||||
from bpy.props import StringProperty
|
from bpy.props import StringProperty
|
||||||
from sverchok.node_tree import SverchCustomTreeNode
|
from sverchok.node_tree import SverchCustomTreeNode
|
||||||
@@ -28,14 +29,21 @@ from sverchok.data_structure import updateNode, flatten_data
|
|||||||
class SvIfcById(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
class SvIfcById(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
||||||
bl_idname = "SvIfcById"
|
bl_idname = "SvIfcById"
|
||||||
bl_label = "IFC By Id"
|
bl_label = "IFC By Id"
|
||||||
|
bl_description = "Get IFC elements by step id from the transient IFC file."
|
||||||
id: StringProperty(
|
id: StringProperty(
|
||||||
name="Id(s)",
|
name="Id(s)",
|
||||||
update=updateNode,
|
update=updateNode,
|
||||||
)
|
)
|
||||||
|
|
||||||
def sv_init(self, context):
|
def sv_init(self, context):
|
||||||
self.inputs.new("SvStringsSocket", "id").prop_name = "id"
|
helper.create_socket(self.inputs, "id", description="Step ids.", data_type="list[list[str]]", prop_name="id")
|
||||||
self.outputs.new("SvStringsSocket", "Entities")
|
helper.create_socket(
|
||||||
|
self.outputs,
|
||||||
|
"Entities",
|
||||||
|
description="Entities.",
|
||||||
|
data_type="list[ifcopenshell.entity_instance]",
|
||||||
|
prop_name="Entities",
|
||||||
|
)
|
||||||
|
|
||||||
def draw_buttons(self, context, layout):
|
def draw_buttons(self, context, layout):
|
||||||
layout.operator("node.sv_ifc_tooltip", text="", icon="QUESTION", emboss=False).tooltip = (
|
layout.operator("node.sv_ifc_tooltip", text="", icon="QUESTION", emboss=False).tooltip = (
|
||||||
|
|||||||
@@ -44,6 +44,7 @@ class SvIfcCreateFileRefresh(bpy.types.Operator):
|
|||||||
class SvIfcCreateFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
class SvIfcCreateFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
||||||
bl_idname = "SvIfcCreateFile"
|
bl_idname = "SvIfcCreateFile"
|
||||||
bl_label = "IFC Create File"
|
bl_label = "IFC Create File"
|
||||||
|
bl_description = "Create a new IFC file."
|
||||||
schema: StringProperty(name="schema", update=updateNode, default="IFC4")
|
schema: StringProperty(name="schema", update=updateNode, default="IFC4")
|
||||||
|
|
||||||
def sv_init(self, context):
|
def sv_init(self, context):
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ from sverchok.data_structure import updateNode
|
|||||||
class SvIfcReadFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
class SvIfcReadFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
||||||
bl_idname = "SvIfcReadFile"
|
bl_idname = "SvIfcReadFile"
|
||||||
bl_label = "IFC Read File"
|
bl_label = "IFC Read File"
|
||||||
|
bl_description = "Read an IFC file from the provided path."
|
||||||
path: StringProperty(name="path", update=updateNode)
|
path: StringProperty(name="path", update=updateNode)
|
||||||
|
|
||||||
def sv_init(self, context):
|
def sv_init(self, context):
|
||||||
|
|||||||
@@ -32,7 +32,8 @@ from sverchok.data_structure import updateNode, ensure_min_nesting
|
|||||||
class SvIfcSverchokToIfcRepr(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
class SvIfcSverchokToIfcRepr(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
||||||
"""
|
"""
|
||||||
Triggers: Sv to Ifc Repr
|
Triggers: Sv to Ifc Repr
|
||||||
Tooltip: Sverchok geometry to Ifc Shape Representation
|
Tooltip: Add Sverchok geometry as IfcShapeRepresentations
|
||||||
|
to the transient IFC file.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
bl_idname = "SvIfcSverchokToIfcRepr"
|
bl_idname = "SvIfcSverchokToIfcRepr"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ from sverchok.data_structure import updateNode, flatten_data
|
|||||||
class SvIfcWriteFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
class SvIfcWriteFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
|
||||||
"""
|
"""
|
||||||
Triggers: Ifc write to file
|
Triggers: Ifc write to file
|
||||||
Tooltip: Write active Sverchok Ifc file to path
|
Tooltip: Write transient Ifc file to path
|
||||||
"""
|
"""
|
||||||
|
|
||||||
def refresh_node_local(self, context):
|
def refresh_node_local(self, context):
|
||||||
|
|||||||
Reference in New Issue
Block a user