2020-03-14 23:30:09 +01:00
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class PlayActionFromNode(ArmLogicTreeNode):
|
2020-10-06 00:08:43 +02:00
|
|
|
"""Plays action starting from the given frame."""
|
2020-03-14 23:30:09 +01:00
|
|
|
bl_idname = 'LNPlayActionFromNode'
|
|
|
|
bl_label = 'Play Action From'
|
2020-09-13 11:27:58 +02:00
|
|
|
arm_version = 1
|
2020-03-14 23:30:09 +01:00
|
|
|
|
|
|
|
def init(self, context):
|
2020-09-13 11:27:58 +02:00
|
|
|
super(PlayActionFromNode, self).init(context)
|
2020-09-08 21:49:02 +02:00
|
|
|
self.add_input('ArmNodeSocketAction', 'In')
|
|
|
|
self.add_input('ArmNodeSocketObject', 'Object')
|
|
|
|
self.add_input('ArmNodeSocketAnimAction', 'Action')
|
|
|
|
self.add_input('NodeSocketInt', 'Start Frame')
|
|
|
|
self.add_input('NodeSocketFloat', 'Blend', default_value=0.2)
|
|
|
|
self.add_output('ArmNodeSocketAction', 'Out')
|
|
|
|
self.add_output('ArmNodeSocketAction', 'Done')
|
2020-03-14 23:30:09 +01:00
|
|
|
|
2020-09-09 20:48:35 +02:00
|
|
|
add_node(PlayActionFromNode, category=PKG_AS_CATEGORY)
|