Blender  V3.3
COM_KeyingScreenNode.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2012 Blender Foundation. */
3 
4 #include "COM_KeyingScreenNode.h"
6 
7 namespace blender::compositor {
8 
9 KeyingScreenNode::KeyingScreenNode(bNode *editor_node) : Node(editor_node)
10 {
11  /* pass */
12 }
13 
15  const CompositorContext &context) const
16 {
17  bNode *editor_node = this->get_bnode();
18  MovieClip *clip = (MovieClip *)editor_node->id;
19  NodeKeyingScreenData *keyingscreen_data = (NodeKeyingScreenData *)editor_node->storage;
20 
21  NodeOutput *output_screen = this->get_output_socket(0);
22 
23  /* Always connect the output image. */
25  operation->set_movie_clip(clip);
26  operation->set_tracking_object(keyingscreen_data->tracking_object);
27  operation->set_framenumber(context.get_framenumber());
28  converter.add_operation(operation);
29 
30  converter.map_output_socket(output_screen, operation->get_output_socket());
31 }
32 
33 } // namespace blender::compositor
Overall context of the compositor.
void convert_to_operations(NodeConverter &converter, const CompositorContext &context) const override
convert node to operation
void map_output_socket(NodeOutput *node_socket, NodeOperationOutput *operation_socket)
void add_operation(NodeOperation *operation)
NodeOperationOutput * get_output_socket(unsigned int index=0)
NodeOutput are sockets that can send data/input.
Definition: COM_Node.h:238
NodeOutput * get_output_socket(unsigned int index=0) const
Definition: COM_Node.cc:84
bNode * get_bnode() const
get the reference to the SDNA bNode struct
Definition: COM_Node.h:64
struct ID * id
void * storage