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

25 lines
668 B
Python
Raw Normal View History

2020-10-13 19:40:42 +11:00
import bpy
import ifcopenshell
import ifcsverchok.helper
from bpy.props import StringProperty
from sverchok.node_tree import SverchCustomTreeNode
from sverchok.data_structure import updateNode
class SvIfcGenerateGuid(bpy.types.Node, SverchCustomTreeNode, ifcsverchok.helper.SvIfcCore):
bl_idname = 'SvIfcGenerateGuid'
bl_label = 'IFC Generate Guid'
def sv_init(self, context):
self.outputs.new('SvStringsSocket', 'guid')
def process(self):
self.outputs['guid'].sv_set([[ifcopenshell.guid.new()]])
def register():
bpy.utils.register_class(SvIfcGenerateGuid)
def unregister():
bpy.utils.unregister_class(SvIfcGenerateGuid)