diff --git a/leenkx/blender/lnx/logicnode/animation/LN_blend_action.py b/leenkx/blender/lnx/logicnode/animation/LN_blend_action.py index b81749f..04ca0fb 100644 --- a/leenkx/blender/lnx/logicnode/animation/LN_blend_action.py +++ b/leenkx/blender/lnx/logicnode/animation/LN_blend_action.py @@ -1,25 +1,25 @@ -from lnx.logicnode.lnx_nodes import * - -class BlendActionNode(LnxLogicTreeNode): - """Interpolates between the two given actions.""" - bl_idname = 'LNBlendActionNode' - bl_label = 'Blend Action' - lnx_version = 2 - - def lnx_init(self, context): - self.add_input('LnxNodeSocketObject', 'Object') - self.add_input('LnxNodeSocketAnimTree', 'Action 1') - self.add_input('LnxNodeSocketAnimTree', 'Action 2') - self.add_input('ArmFactorSocket', 'Factor', default_value = 0.5) - self.add_input('LnxIntSocket', 'Bone Group', default_value = -1) - - self.add_output('LnxNodeSocketAnimTree', 'Result') - - def get_replacement_node(self, node_tree: bpy.types.NodeTree): - if self.lnx_version not in (0, 1): - raise LookupError() - - return NodeReplacement( - 'LNBlendActionNode', self.lnx_version, 'LNBlendActionNode', 2, - in_socket_mapping={}, out_socket_mapping={} - ) +from lnx.logicnode.lnx_nodes import * + +class BlendActionNode(LnxLogicTreeNode): + """Interpolates between the two given actions.""" + bl_idname = 'LNBlendActionNode' + bl_label = 'Blend Action' + lnx_version = 2 + + def lnx_init(self, context): + self.add_input('LnxNodeSocketObject', 'Object') + self.add_input('LnxNodeSocketAnimTree', 'Action 1') + self.add_input('LnxNodeSocketAnimTree', 'Action 2') + self.add_input('LnxFactorSocket', 'Factor', default_value = 0.5) + self.add_input('LnxIntSocket', 'Bone Group', default_value = -1) + + self.add_output('LnxNodeSocketAnimTree', 'Result') + + def get_replacement_node(self, node_tree: bpy.types.NodeTree): + if self.lnx_version not in (0, 1): + raise LookupError() + + return NodeReplacement( + 'LNBlendActionNode', self.lnx_version, 'LNBlendActionNode', 2, + in_socket_mapping={}, out_socket_mapping={} + ) diff --git a/leenkx/blender/lnx/logicnode/animation/LN_blend_space_gpu.py b/leenkx/blender/lnx/logicnode/animation/LN_blend_space_gpu.py index d4bf59b..97814f2 100644 --- a/leenkx/blender/lnx/logicnode/animation/LN_blend_space_gpu.py +++ b/leenkx/blender/lnx/logicnode/animation/LN_blend_space_gpu.py @@ -112,8 +112,8 @@ class BlendSpaceNode(LnxLogicTreeNode): def lnx_init(self, context): self.add_input('LnxNodeSocketObject', 'Object') self.add_input('LnxNodeSocketArray', 'Actions') - self.add_input('ArmBlendSpaceSocket', 'Cursor X') - self.add_input('ArmBlendSpaceSocket', 'Cursor Y') + self.add_input('LnxBlendSpaceSocket', 'Cursor X') + self.add_input('LnxBlendSpaceSocket', 'Cursor Y') self.add_output('LnxNodeSocketAnimTree', 'Out') def add_advanced_draw(self): diff --git a/leenkx/blender/lnx/logicnode/animation/LN_bone_ik.py b/leenkx/blender/lnx/logicnode/animation/LN_bone_ik.py index e088be1..7700791 100644 --- a/leenkx/blender/lnx/logicnode/animation/LN_bone_ik.py +++ b/leenkx/blender/lnx/logicnode/animation/LN_bone_ik.py @@ -45,7 +45,7 @@ class BoneIKNode(LnxLogicTreeNode): self.add_input('LnxBoolSocket', 'Enable Pole') self.add_input('LnxVectorSocket', 'Pole Position') self.add_input('LnxFloatSocket', 'Roll Angle') - self.add_input('ArmFactorSocket', 'Influence', default_value = 1.0) + self.add_input('LnxFactorSocket', 'Influence', default_value = 1.0) self.add_input('LnxIntSocket', 'Bone Group', default_value = 0) self.add_output('LnxNodeSocketAnimTree', 'Result') diff --git a/leenkx/blender/lnx/logicnode/lnx_sockets.py b/leenkx/blender/lnx/logicnode/lnx_sockets.py index ddbf4f8..8c22599 100644 --- a/leenkx/blender/lnx/logicnode/lnx_sockets.py +++ b/leenkx/blender/lnx/logicnode/lnx_sockets.py @@ -32,8 +32,8 @@ socket_colors = { 'LnxVectorSocket': (0.39, 0.39, 0.78, 1.0), 'LnxAnySocket': (0.9, 0.9, 0.9, 1), 'LnxNodeSocketAnimTree': (0.3, 0.1, 0.0, 1.0), - 'ArmFactorSocket': (0.631, 0.631, 0.631, 1.0), - 'ArmBlendSpaceSocket': (0.631, 0.631, 0.631, 1.0) + 'LnxFactorSocket': (0.631, 0.631, 0.631, 1.0), + 'LnxBlendSpaceSocket': (0.631, 0.631, 0.631, 1.0) } @@ -591,8 +591,8 @@ class LnxAnimTreeSocket(LnxCustomSocket): def draw_color(self, context, node): return socket_colors[self.bl_idname] -class ArmFactorSocket(LnxCustomSocket): - bl_idname = 'ArmFactorSocket' +class LnxFactorSocket(LnxCustomSocket): + bl_idname = 'LnxFactorSocket' bl_label = 'Factor Socket' lnx_socket_type = 'FACTOR' @@ -614,8 +614,8 @@ class ArmFactorSocket(LnxCustomSocket): def get_default_value(self): return self.default_value_raw -class ArmBlendSpaceSocket(LnxCustomSocket): - bl_idname = 'ArmBlendSpaceSocket' +class LnxBlendSpaceSocket(LnxCustomSocket): + bl_idname = 'LnxBlendSpaceSocket' bl_label = 'Blend Space Socket' lnx_socket_type = 'FACTOR' @@ -718,8 +718,8 @@ LnxStringSocketInterface = _make_socket_interface('LnxStringSocketInterface', 'L LnxVectorSocketInterface = _make_socket_interface('LnxVectorSocketInterface', 'LnxVectorSocket') LnxAnySocketInterface = _make_socket_interface('LnxAnySocketInterface', 'LnxAnySocket') LnxAnimTreeSocketInterface = _make_socket_interface('LnxAnimTreeSocketInterface', 'LnxNodeSocketAnimTree') -ArmFactorSocketInterface = _make_socket_interface('ArmFactorSocketInterface', 'ArmFactorSocket') -ArmBlendSpaceSocketInterface = _make_socket_interface('ArmBlendSpaceSocketInterface', 'ArmBlendSpaceSocket') +LnxFactorSocketInterface = _make_socket_interface('LnxFactorSocketInterface', 'LnxFactorSocket') +LnxBlendSpaceSocketInterface = _make_socket_interface('LnxBlendSpaceSocketInterface', 'LnxBlendSpaceSocket') __REG_CLASSES = ( LnxActionSocketInterface, @@ -736,8 +736,8 @@ __REG_CLASSES = ( LnxVectorSocketInterface, LnxAnySocketInterface, LnxAnimTreeSocketInterface, - ArmFactorSocketInterface, - ArmBlendSpaceSocketInterface, + LnxFactorSocketInterface, + LnxBlendSpaceSocketInterface, LnxActionSocket, LnxAnimActionSocket, @@ -753,7 +753,7 @@ __REG_CLASSES = ( LnxVectorSocket, LnxAnySocket, LnxAnimTreeSocket, - ArmFactorSocket, - ArmBlendSpaceSocket, + LnxFactorSocket, + LnxBlendSpaceSocket, ) register, unregister = bpy.utils.register_classes_factory(__REG_CLASSES)