Files
test/source/blender/compositor/nodes/COM_KeyingScreenNode.cc

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
1.1 KiB
C++
Raw Normal View History

/* SPDX-License-Identifier: GPL-2.0-or-later
* Copyright 2012 Blender Foundation. */
#include "COM_KeyingScreenNode.h"
#include "COM_KeyingScreenOperation.h"
2021-03-23 17:12:27 +01:00
namespace blender::compositor {
KeyingScreenNode::KeyingScreenNode(bNode *editor_node) : Node(editor_node)
{
2012-06-15 17:57:39 +00:00
/* pass */
}
void KeyingScreenNode::convert_to_operations(NodeConverter &converter,
const CompositorContext &context) const
{
bNode *editor_node = this->get_bnode();
MovieClip *clip = (MovieClip *)editor_node->id;
NodeKeyingScreenData *keyingscreen_data = (NodeKeyingScreenData *)editor_node->storage;
2018-06-17 17:05:29 +02:00
NodeOutput *output_screen = this->get_output_socket(0);
2018-06-17 17:05:29 +02:00
/* Always connect the output image. */
KeyingScreenOperation *operation = new KeyingScreenOperation();
operation->set_movie_clip(clip);
operation->set_tracking_object(keyingscreen_data->tracking_object);
operation->set_framenumber(context.get_framenumber());
converter.add_operation(operation);
2018-06-17 17:05:29 +02:00
converter.map_output_socket(output_screen, operation->get_output_socket());
}
2021-03-23 17:12:27 +01:00
} // namespace blender::compositor