LNXSDK/leenkx/blender/lnx/logicnode/object/LN_spawn_object.py

18 lines
720 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
from lnx.logicnode.lnx_nodes import *
class SpawnObjectNode(LnxLogicTreeNode):
"""Spawns the given object if present in the current active scene. The spawned object has the same name of its instance, but they are treated as different objects."""
bl_idname = 'LNSpawnObjectNode'
bl_label = 'Spawn Object'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxDynamicSocket', 'Transform')
self.add_input('LnxBoolSocket', 'Children', default_value=True)
self.add_output('LnxNodeSocketAction', 'Out')
self.add_output('LnxNodeSocketObject', 'Object')