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

16 lines
522 B
Python

from lnx.logicnode.lnx_nodes import *
class ArraySampleNode(LnxLogicTreeNode):
"""Take a sample of n items from an array (boolean option to remove those items from original array)
"""
bl_idname = 'LNArraySampleNode'
bl_label = 'Array Sample'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketArray', 'Array')
self.add_input('LnxIntSocket', 'Sample')
self.add_input('LnxBoolSocket', 'Remove')
self.add_output('LnxNodeSocketArray', 'Array')