armory/blender/arm/logicnode/value_length_string.py

16 lines
466 B
Python
Raw Normal View History

2019-09-29 20:52:00 +02:00
import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class LengthStringNode(Node, ArmLogicTreeNode):
'''String Length node'''
bl_idname = 'LNLengthStringNode'
bl_label = 'String Length'
bl_icon = 'CURVE_PATH'
def init(self, context):
self.outputs.new('NodeSocketInt', 'length')
self.inputs.new('NodeSocketString', 'String')
add_node(LengthStringNode, category='Value')