2019-09-29 20:52:00 +02:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class CaseStringNode(ArmLogicTreeNode):
|
2020-10-05 19:55:56 +02:00
|
|
|
"""Changes the given string case."""
|
2019-09-29 20:52:00 +02:00
|
|
|
bl_idname = 'LNCaseStringNode'
|
2020-09-25 00:49:21 +02:00
|
|
|
bl_label = 'String Case'
|
2020-09-13 11:27:58 +02:00
|
|
|
arm_version = 1
|
2019-09-29 20:52:00 +02:00
|
|
|
property0: EnumProperty(
|
|
|
|
items = [('Upper Case', 'Upper Case', 'Upper Case'),
|
|
|
|
('Lower Case', 'Lower Case', 'Lower Case'),
|
|
|
|
],
|
|
|
|
name='', default='Upper Case')
|
2020-09-08 17:03:24 +02:00
|
|
|
|
2019-09-29 20:52:00 +02:00
|
|
|
def init(self, context):
|
2020-09-13 11:27:58 +02:00
|
|
|
super(CaseStringNode, self).init(context)
|
2020-09-20 20:10:01 +02:00
|
|
|
self.add_input('NodeSocketString', 'String In')
|
2020-11-17 16:01:15 +01:00
|
|
|
|
2020-09-20 20:10:01 +02:00
|
|
|
self.add_output('NodeSocketString', 'String Out')
|
2019-09-29 20:52:00 +02:00
|
|
|
|
|
|
|
def draw_buttons(self, context, layout):
|
|
|
|
layout.prop(self, 'property0')
|