armory/blender/arm/logicnode/animation/LN_set_parent_bone.py

18 lines
677 B
Python

from arm.logicnode.arm_nodes import *
class SetParentBoneNode(ArmLogicTreeNode):
"""Set parent bone node"""
bl_idname = 'LNSetParentBoneNode'
bl_label = 'Set Parent Bone'
arm_version = 1
def init(self, context):
super(SetParentBoneNode, self).init(context)
self.add_input('ArmNodeSocketAction', 'In')
self.add_input('ArmNodeSocketObject', 'Object')
self.add_input('ArmNodeSocketObject', 'Parent', default_value='Parent')
self.add_input('NodeSocketString', 'Bone', default_value='Bone')
self.add_output('ArmNodeSocketAction', 'Out')
add_node(SetParentBoneNode, category=PKG_AS_CATEGORY, section='armature')