Files
IfcOpenShell/src/ifcsverchok/nodes/ifc/write_file.py
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

33 lines
929 B
Python
Raw Normal View History

import bpy
import ifcopenshell
import ifcsverchok.helper
from bpy.props import StringProperty
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode
2020-10-01 14:47:42 +10:00
class SvIfcWriteFile(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
bl_idname = "SvIfcWriteFile"
bl_label = "IFC Write File"
file: StringProperty(name="file", update=updateNode)
path: StringProperty(name="path", update=updateNode)
def sv_init(self, context):
self.inputs.new("SvStringsSocket", "file").prop_name = "file"
self.inputs.new("SvStringsSocket", "path").prop_name = "path"
def process(self):
self.sv_input_names = ["file", "path"]
super().process()
def process_ifc(self, file, path):
file.write(path)
2020-11-01 19:24:01 +07:00
def register():
2020-10-01 14:47:42 +10:00
bpy.utils.register_class(SvIfcWriteFile)
2020-11-01 19:24:01 +07:00
def unregister():
2020-10-01 14:47:42 +10:00
bpy.utils.unregister_class(SvIfcWriteFile)