2017-04-03 22:29:46 +02:00
|
|
|
import bpy
|
|
|
|
from bpy.props import *
|
|
|
|
from bpy.types import Node, NodeSocket
|
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class SpawnObjectNode(ArmLogicTreeNode):
|
2017-04-04 23:11:31 +02:00
|
|
|
'''Spawn object node'''
|
|
|
|
bl_idname = 'LNSpawnObjectNode'
|
|
|
|
bl_label = 'Spawn Object'
|
2020-08-07 18:58:19 +02:00
|
|
|
bl_icon = 'NONE'
|
2017-04-03 22:29:46 +02:00
|
|
|
|
|
|
|
def init(self, context):
|
2017-04-08 20:05:35 +02:00
|
|
|
self.inputs.new('ArmNodeSocketAction', 'In')
|
2017-04-08 00:34:45 +02:00
|
|
|
self.inputs.new('ArmNodeSocketObject', 'Object')
|
2017-04-08 20:05:35 +02:00
|
|
|
self.inputs.new('NodeSocketShader', 'Transform')
|
2018-10-14 18:51:13 +02:00
|
|
|
self.inputs.new('NodeSocketBool', 'Children')
|
|
|
|
self.inputs[-1].default_value = True
|
2017-04-08 20:05:35 +02:00
|
|
|
self.outputs.new('ArmNodeSocketAction', 'Out')
|
2017-04-08 00:34:45 +02:00
|
|
|
self.outputs.new('ArmNodeSocketObject', 'Object')
|
2017-04-03 22:29:46 +02:00
|
|
|
|
2020-09-08 17:03:24 +02:00
|
|
|
add_node(SpawnObjectNode, category=MODULE_AS_CATEGORY)
|