from lnx.logicnode.lnx_nodes import *

class EvaluateRootMotionNode(LnxLogicTreeNode):
    """Calculates the root motion bone in an armature object."""
    bl_idname = 'LNEvaluateRootMotionNode'
    bl_label = 'Evaluate Root Motion'
    lnx_version = 1

    property0: HaxeEnumProperty(
            'property0',
            items = [('X', 'X', 'X'),
                     ('Y', 'Y', 'Y'),
                     ('Z', 'Z', 'Z')],
            name='', default='Y')

    def lnx_init(self, context):
        self.add_input('LnxNodeSocketAction', 'Reset')
        self.add_input('LnxNodeSocketObject', 'Object')
        self.add_input('LnxNodeSocketAnimTree', 'Action')
        
        self.add_input('LnxStringSocket', 'Bone')

        self.add_output('LnxNodeSocketAnimTree', 'Result')

    def draw_buttons(self, context, layout):
        layout.label(text='Root Motion Lock axis:')
        layout.prop(self, 'property0')