armory/blender/arm/logicnode/string/LN_length_string.py

17 lines
464 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(ArmLogicTreeNode):
2019-09-29 20:52:00 +02:00
'''String Length node'''
bl_idname = 'LNLengthStringNode'
bl_label = 'String Length'
2020-08-07 19:05:48 +02:00
bl_icon = 'NONE'
2019-09-29 20:52:00 +02:00
def init(self, context):
2020-09-08 21:49:02 +02:00
self.add_output('NodeSocketInt', 'length')
self.add_input('NodeSocketString', 'String')
2019-09-29 20:52:00 +02:00
add_node(LengthStringNode, category=MODULE_AS_CATEGORY)