armory/blender/arm/logicnode/variable_group.py

21 lines
597 B
Python
Raw Normal View History

2017-11-27 09:30:06 +01:00
import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class GroupNode(Node, ArmLogicTreeNode):
'''Group node'''
bl_idname = 'LNGroupNode'
2019-01-22 15:35:06 +01:00
bl_label = 'Collection'
2018-12-18 23:48:38 +01:00
bl_icon = 'QUESTION'
2017-11-27 09:30:06 +01:00
2019-01-22 15:35:06 +01:00
property0: PointerProperty(name='', type=bpy.types.Collection)
2017-11-27 09:30:06 +01:00
def init(self, context):
2018-06-12 23:16:28 +02:00
self.outputs.new('ArmNodeSocketArray', 'Array')
2017-11-27 09:30:06 +01:00
def draw_buttons(self, context, layout):
2019-01-22 15:35:06 +01:00
layout.prop_search(self, 'property0', bpy.data, 'collections', icon='NONE', text='')
2017-11-27 09:30:06 +01:00
add_node(GroupNode, category='Variable')