16 lines
522 B
Python
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')
|