armory/blender/arm/logicnode/physics/LN_set_rb_activation_state.py
knowledgenude 46492cc425 fixes
2020-11-17 17:35:22 -03:00

27 lines
1.1 KiB
Python

from arm.logicnode.arm_nodes import *
class SetActivationStateNode(ArmLogicTreeNode):
"""Sets the rigid body simulation state of the given object."""
bl_idname = 'LNSetActivationStateNode'
bl_label = 'Set RB Activation State'
bl_icon = 'NONE'
arm_version = 1
property0: EnumProperty(
items = [('inactive', 'Inactive', 'The rigid body simulation is deactivated'),
('active', 'Active', 'The rigid body simulation is activated'),
('always active', 'Always Active', 'The rigid body simulation is never deactivated'),
('always inactive', 'Always Inactive', 'The rigid body simulation is never activated'),
],
name='', default='inactive')
def init(self, context):
super(SetActivationStateNode, self).init(context)
self.inputs.new('ArmNodeSocketAction', 'In')
self.inputs.new('ArmNodeSocketObject', 'RB')
self.outputs.new('ArmNodeSocketAction', 'Out')
def draw_buttons(self, context, layout):
layout.prop(self, 'property0')