Improve Set Activation Node
This commit is contained in:
parent
37bd828784
commit
193c712bf4
|
@ -3,16 +3,25 @@ from bpy.props import *
|
|||
from bpy.types import Node, NodeSocket
|
||||
from arm.logicnode.arm_nodes import *
|
||||
|
||||
class SetActivationStateNode (Node, ArmLogicTreeNode):
|
||||
class SetActivationStateNode(Node, ArmLogicTreeNode):
|
||||
'''Set Activation State Node'''
|
||||
bl_idname = 'LNSetActivationStateNode'
|
||||
bl_label = 'Set Activation State'
|
||||
bl_icon = 'NONE'
|
||||
property0: EnumProperty(
|
||||
items = [('Inactive', 'Inactive', 'Inactive'),
|
||||
('Active', 'Active', 'Active'),
|
||||
('Always Active', 'Always Active', 'Always Active'),
|
||||
('Always Inactive', 'Always Inactive', 'Always Inactive'),
|
||||
],
|
||||
name='', default='Inactive')
|
||||
|
||||
def init(self, context):
|
||||
self.inputs.new('ArmNodeSocketAction', 'In')
|
||||
self.inputs.new('ArmNodeSocketObject', 'Object')
|
||||
self.inputs.new('NodeSocketInt', 'State')
|
||||
self.outputs.new('ArmNodeSocketAction', 'Out')
|
||||
|
||||
def draw_buttons(self, context, layout):
|
||||
layout.prop(self, 'property0')
|
||||
|
||||
add_node(SetActivationStateNode, category='Physics')
|
||||
|
|
Loading…
Reference in a new issue