armory/blender/arm/logicnode/action_set_camera.py

19 lines
541 B
Python
Raw Normal View History

2018-11-10 20:39:51 +01:00
import bpy
from bpy.props import *
from bpy.types import Node, NodeSocket
from arm.logicnode.arm_nodes import *
class SetCameraNode(Node, ArmLogicTreeNode):
"""Set the active camera of the active scene."""
2018-11-10 20:39:51 +01:00
bl_idname = 'LNSetCameraNode'
bl_label = 'Set Active Camera'
2020-08-07 18:58:19 +02:00
bl_icon = 'NONE'
2018-11-10 20:39:51 +01:00
def init(self, context):
self.inputs.new('ArmNodeSocketAction', 'In')
self.inputs.new('ArmNodeSocketObject', 'Object')
2018-11-10 20:39:51 +01:00
self.outputs.new('ArmNodeSocketAction', 'Out')
add_node(SetCameraNode, category='Action')