LNXSDK/leenkx/blender/lnx/logicnode/animation/LN_switch_action.py

20 lines
892 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
from lnx.logicnode.lnx_nodes import *
class SwitchActionNode(LnxLogicTreeNode):
"""Switch between the two given actions with interpolation."""
bl_idname = 'LNSwitchActionNode'
bl_label = 'Switch Action'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'Action 1')
self.add_input('LnxNodeSocketAction', 'Action 2')
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxNodeSocketAnimTree', 'Action 1')
self.add_input('LnxNodeSocketAnimTree', 'Action 2')
self.add_input('LnxBoolSocket', 'Restart', default_value = True)
self.add_input('LnxFloatSocket', 'Time', default_value = 1.0)
self.add_input('LnxIntSocket', 'Bone Group', default_value = -1)
self.add_output('LnxNodeSocketAction', 'Done')
self.add_output('LnxNodeSocketAnimTree', 'Result')