Files
LNXSDK/leenkx/blender/lnx/logicnode/object/LN_set_object_instanced.py

28 lines
1.2 KiB
Python

from lnx.logicnode.lnx_nodes import *
class SetObjectInstancedNode(LnxLogicTreeNode):
"""Sets the object instanced from an array of LOC, ROT and SCL."""
bl_idname = 'LNSetObjectInstancedNode'
bl_label = 'Set Object Instanced'
lnx_version = 1
property0: HaxeEnumProperty(
'property0',
items = [('1', 'Loc', 'Instances use their unique position (ipos)'),
('2', 'Loc + Rot', 'Instances use their unique position and rotation (ipos and irot)'),
('3', 'Loc + Scale', 'Instances use their unique position and scale (ipos and iscl)'),
('4', 'Loc + Rot + Scale', 'Instances use their unique position, rotation and scale (ipos, irot, iscl)')],
name='', default='1', update='')
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxNodeSocketArray', 'Array Instanced')
self.add_input('LnxBoolSocket', 'Include original', default_value=False)
self.add_input('LnxBoolSocket', 'Dynamic Usage', default_value=False)
self.add_output('LnxNodeSocketAction', 'Out')
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')