armory/blender/arm/logicnode/action_translate_on_local_axis.py

22 lines
750 B
Python
Raw Normal View History

2018-02-18 19:19:43 +01:00
import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
import arm.nodes_logic
class TranslateOnLocalAxisNode(Node, ArmLogicTreeNode):
'''TranslateOnLocalAxisNode'''
bl_idname = 'LNTranslateOnLocalAxisNode'
bl_label = 'Translate On Local Axis'
2020-08-07 18:58:19 +02:00
bl_icon = 'NONE'
2018-02-18 19:19:43 +01:00
def init(self, context):
self.inputs.new('ArmNodeSocketAction', 'In')
self.inputs.new('ArmNodeSocketObject', 'Object')
self.inputs.new('NodeSocketFloat', 'Speed')
self.inputs.new('NodeSocketInt', 'Forward/Up/Right')
self.inputs.new('NodeSocketBool', 'Inverse')
self.outputs.new('ArmNodeSocketAction', 'Out')
2018-02-20 18:46:16 +01:00
add_node(TranslateOnLocalAxisNode, category='Action')