forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
23
leenkx/blender/lnx/logicnode/string/LN_string_contains.py
Normal file
23
leenkx/blender/lnx/logicnode/string/LN_string_contains.py
Normal file
@ -0,0 +1,23 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class ContainsStringNode(LnxLogicTreeNode):
|
||||
"""Returns whether the given string contains a given part."""
|
||||
bl_idname = 'LNContainsStringNode'
|
||||
bl_label = 'String Contains'
|
||||
lnx_version = 1
|
||||
property0: HaxeEnumProperty(
|
||||
'property0',
|
||||
items = [('Contains', 'Contains', 'Contains'),
|
||||
('Starts With', 'Starts With', 'Starts With'),
|
||||
('Ends With', 'Ends With', 'Ends With'),
|
||||
],
|
||||
name='', default='Contains')
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxStringSocket', 'String')
|
||||
self.add_input('LnxStringSocket', 'Find')
|
||||
|
||||
self.add_output('LnxBoolSocket', 'Contains')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
Reference in New Issue
Block a user