2018-11-12 21:06:12 +01:00
|
|
|
import bpy
|
|
|
|
from bpy.props import *
|
|
|
|
from bpy.types import Node, NodeSocket
|
|
|
|
from arm.logicnode.arm_nodes import *
|
|
|
|
|
2020-09-08 21:16:20 +02:00
|
|
|
class ApplyTorqueNode(ArmLogicTreeNode):
|
2018-11-12 21:06:12 +01:00
|
|
|
'''Apply torque node'''
|
|
|
|
bl_idname = 'LNApplyTorqueNode'
|
|
|
|
bl_label = 'Apply Torque'
|
2020-08-07 19:03:29 +02:00
|
|
|
bl_icon = 'NONE'
|
2018-11-12 21:06:12 +01:00
|
|
|
|
|
|
|
def init(self, context):
|
2020-09-08 21:49:02 +02:00
|
|
|
self.add_input('ArmNodeSocketAction', 'In')
|
|
|
|
self.add_input('ArmNodeSocketObject', 'Object')
|
|
|
|
self.add_input('NodeSocketVector', 'Torque')
|
|
|
|
self.add_output('ArmNodeSocketAction', 'Out')
|
2018-11-12 21:06:12 +01:00
|
|
|
|
2020-09-08 17:03:24 +02:00
|
|
|
add_node(ApplyTorqueNode, category=MODULE_AS_CATEGORY, section='force')
|