2025-01-22 16:18:30 +01:00

23 lines
798 B
Python

from lnx.logicnode.lnx_nodes import *
class PromptNode(LnxLogicTreeNode):
"""Open a prompt with the give string value an returns either the user value
or the default string if specified (works only for web browsers).
@input String: message to display.
@input Default: default string value in case there is no user input.
@output String: user input value or default value in case is specified.
"""
bl_idname = 'LNPromptNode'
bl_label = 'Prompt'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxStringSocket', 'String')
self.add_input('LnxStringSocket', 'Default')
self.add_output('LnxNodeSocketAction', 'Out')
self.add_output('LnxStringSocket', 'String')