forked from LeenkxTeam/LNXSDK
Update Files
This commit is contained in:
24
leenkx/blender/lnx/logicnode/animation/LN_restart_action.py
Normal file
24
leenkx/blender/lnx/logicnode/animation/LN_restart_action.py
Normal file
@ -0,0 +1,24 @@
|
||||
from lnx.logicnode.lnx_nodes import *
|
||||
|
||||
class RestartActionNode(LnxLogicTreeNode):
|
||||
"""Restarts the action"""
|
||||
bl_idname = 'LNRestartActionNode'
|
||||
bl_label = 'Restart Action'
|
||||
bl_width_default = 200
|
||||
lnx_version = 2
|
||||
|
||||
def lnx_init(self, context):
|
||||
self.add_input('LnxNodeSocketAction', 'In')
|
||||
self.add_input('LnxNodeSocketObject', 'Object')
|
||||
self.add_input('LnxStringSocket', 'Action ID')
|
||||
|
||||
self.add_output('LnxNodeSocketAction', 'Out')
|
||||
|
||||
def get_replacement_node(self, node_tree: bpy.types.NodeTree):
|
||||
if self.lnx_version not in (0, 1):
|
||||
raise LookupError()
|
||||
|
||||
return NodeReplacement(
|
||||
'LNRestartActionNode', self.lnx_version, 'LNRestartActionNode', 2,
|
||||
in_socket_mapping={}, out_socket_mapping={}
|
||||
)
|
Reference in New Issue
Block a user