2017-03-21 03:06:38 +01: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 SurfaceNode(ArmLogicTreeNode):
|
2017-04-10 21:17:17 +02:00
|
|
|
'''Surface node'''
|
2019-04-30 17:07:57 +02:00
|
|
|
bl_idname = 'LNMergedSurfaceNode'
|
2019-01-30 22:05:55 +01:00
|
|
|
bl_label = 'Surface'
|
2020-08-07 19:03:29 +02:00
|
|
|
bl_icon = 'NONE'
|
2018-12-18 23:48:38 +01:00
|
|
|
property0: EnumProperty(
|
2017-04-10 21:17:17 +02:00
|
|
|
items = [('Touched', 'Touched', 'Touched'),
|
2017-04-03 22:29:46 +02:00
|
|
|
('Started', 'Started', 'Started'),
|
|
|
|
('Released', 'Released', 'Released'),
|
|
|
|
('Moved', 'Moved', 'Moved')],
|
2017-04-10 21:17:17 +02:00
|
|
|
name='', default='Touched')
|
2020-09-08 17:03:24 +02:00
|
|
|
|
2017-03-21 03:06:38 +01:00
|
|
|
def init(self, context):
|
2019-01-30 22:05:55 +01:00
|
|
|
self.outputs.new('ArmNodeSocketAction', 'Out')
|
2017-04-03 22:29:46 +02:00
|
|
|
self.outputs.new('NodeSocketBool', 'State')
|
|
|
|
|
|
|
|
def draw_buttons(self, context, layout):
|
|
|
|
layout.prop(self, 'property0')
|
2017-03-21 03:06:38 +01:00
|
|
|
|
2020-09-08 17:03:24 +02:00
|
|
|
add_node(SurfaceNode, category=MODULE_AS_CATEGORY, section='surface')
|