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):
|
2020-09-03 22:50:02 +02:00
|
|
|
"""Set the active camera of the active scene."""
|
2018-11-10 20:39:51 +01:00
|
|
|
bl_idname = 'LNSetCameraNode'
|
2020-09-03 22:50:02 +02:00
|
|
|
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')
|
2020-09-03 22:50:02 +02:00
|
|
|
|
2018-11-10 20:39:51 +01:00
|
|
|
self.outputs.new('ArmNodeSocketAction', 'Out')
|
|
|
|
|
|
|
|
add_node(SetCameraNode, category='Action')
|