armory/blender/arm/logicnode/action_rotate_object_around_axis.py

26 lines
975 B
Python
Raw Normal View History

2019-05-06 19:27:52 +02:00
import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class RotateObjectAroundAxisNode(Node, ArmLogicTreeNode):
'''Rotate object around axis node'''
bl_idname = 'LNRotateObjectAroundAxisNode'
bl_label = 'Rotate Object Around Axis'
bl_description = 'Rotate Object Around Axis (Depreciated: use "Rotate Object")'
bl_icon = 'ERROR'
2019-05-06 19:27:52 +02:00
def init(self, context):
self.inputs.new('ArmNodeSocketAction', 'In')
self.inputs.new('ArmNodeSocketObject', 'Object')
self.inputs.new('NodeSocketVector', 'Axis')
self.inputs[-1].default_value = [0, 0, 1]
self.inputs.new('NodeSocketFloat', 'Angle')
self.outputs.new('ArmNodeSocketAction', 'Out')
def draw_buttons(self, context, layout):
row = layout.row(align=True)
row.label(text='Depreciated. Consider using "Rotate Object"')
2019-05-06 19:27:52 +02:00
add_node(RotateObjectAroundAxisNode, category='Action')