LNXSDK/leenkx/blender/lnx/logicnode/random/LN_random_choice.py
2025-01-22 16:18:30 +01:00

14 lines
364 B
Python

from lnx.logicnode.lnx_nodes import *
class RandomChoiceNode(LnxLogicTreeNode):
"""Choose a random value from a given array."""
bl_idname = 'LNRandomChoiceNode'
bl_label = 'Random Choice'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketArray', 'Array')
self.add_output('LnxDynamicSocket', 'Value')