Blender V4.3
COM_KeyingScreenNode.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2012 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
7
8namespace blender::compositor {
9
10KeyingScreenNode::KeyingScreenNode(bNode *editor_node) : Node(editor_node)
11{
12 /* pass */
13}
14
16 const CompositorContext &context) const
17{
18 const bNode *editor_node = this->get_bnode();
19 MovieClip *clip = (MovieClip *)editor_node->id;
20 NodeKeyingScreenData *keyingscreen_data = (NodeKeyingScreenData *)editor_node->storage;
21
22 NodeOutput *output_screen = this->get_output_socket(0);
23
24 /* Always connect the output image. */
26 operation->set_movie_clip(clip);
27 operation->set_tracking_object(keyingscreen_data->tracking_object);
28 operation->set_smoothness(keyingscreen_data->smoothness);
29 operation->set_framenumber(context.get_framenumber());
30 converter.add_operation(operation);
31
32 converter.map_output_socket(output_screen, operation->get_output_socket());
33}
34
35} // 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:239
NodeOutput * get_output_socket(unsigned int index=0) const
Definition COM_Node.cc:85
const bNode * get_bnode() const
get the reference to the SDNA bNode struct
Definition COM_Node.h:65
struct ID * id
void * storage