2017-03-15 12:30:14 +01:00
|
|
|
from arm.logicnode.arm_nodes import *
|
2017-03-06 02:29:03 +01:00
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class SetVisibleNode(ArmLogicTreeNode):
|
2020-09-23 22:12:25 +02:00
|
|
|
"""Use to set if an object is visible."""
|
2017-04-04 23:11:31 +02:00
|
|
|
bl_idname = 'LNSetVisibleNode'
|
2020-09-25 00:49:21 +02:00
|
|
|
bl_label = 'Set Object Visible'
|
2020-09-13 20:43:27 +02:00
|
|
|
arm_version = 1
|
2020-09-13 20:59:48 +02:00
|
|
|
|
2020-09-13 19:11:57 +02:00
|
|
|
property0: EnumProperty(
|
|
|
|
items = [('Object', 'Object', 'Object'),
|
|
|
|
('Mesh', 'Mesh', 'Mesh'),
|
|
|
|
('Shadow', 'Shadow', 'Shadow'),
|
|
|
|
],
|
|
|
|
name='', default='Object')
|
2017-03-06 02:29:03 +01:00
|
|
|
|
|
|
|
def init(self, context):
|
2020-09-13 20:59:48 +02:00
|
|
|
super(SetVisibleNode, self).init(context)
|
2020-09-08 21:49:02 +02:00
|
|
|
self.add_input('ArmNodeSocketAction', 'In')
|
|
|
|
self.add_input('ArmNodeSocketObject', 'Object')
|
2020-09-09 21:11:49 +02:00
|
|
|
self.add_input('NodeSocketBool', 'Visible')
|
2020-09-14 01:08:59 +02:00
|
|
|
self.add_input('NodeSocketBool', 'Children')
|
2020-09-08 21:49:02 +02:00
|
|
|
self.add_output('ArmNodeSocketAction', 'Out')
|
2020-09-13 19:11:57 +02:00
|
|
|
|
|
|
|
def draw_buttons(self, context, layout):
|
|
|
|
layout.prop(self, 'property0')
|
2017-03-06 02:29:03 +01:00
|
|
|
|
2020-09-09 20:48:35 +02:00
|
|
|
add_node(SetVisibleNode, category=PKG_AS_CATEGORY, section='props')
|