22 lines
921 B
Python
Raw Normal View History

2025-01-22 16:18:30 +01:00
from lnx.logicnode.lnx_nodes import *
class SyncActionsNode(LnxLogicTreeNode):
"""Sync two actions when blending from one to the other such that Frame A and B in both actions align."""
bl_idname = 'LNSyncActionNode'
bl_label = 'Sync Action'
lnx_version = 1
def lnx_init(self, context):
self.add_input('LnxNodeSocketAction', 'In')
self.add_input('LnxNodeSocketObject', 'Object')
self.add_input('LnxStringSocket', 'From ID')
self.add_input('LnxIntSocket', 'Frame A', default_value=0)
self.add_input('LnxIntSocket', 'Frame B', default_value=-1)
self.add_input('LnxBoolSocket', 'Reset Speed', default_value=True)
self.add_input('LnxStringSocket', 'To ID')
self.add_input('LnxIntSocket', 'Frame A', default_value=0)
self.add_input('LnxIntSocket', 'Frame B', default_value=-1)
self.add_output('LnxNodeSocketAction', 'Out')