2022-02-11 09:07:11 +11:00
|
|
|
/* SPDX-License-Identifier: GPL-2.0-or-later
|
|
|
|
|
* Copyright 2014 Blender Foundation. */
|
2014-07-26 12:59:29 +02:00
|
|
|
|
|
|
|
|
#include "COM_SunBeamsNode.h"
|
|
|
|
|
#include "COM_SunBeamsOperation.h"
|
|
|
|
|
|
2021-03-23 17:12:27 +01:00
|
|
|
namespace blender::compositor {
|
|
|
|
|
|
2021-10-13 23:01:15 +02:00
|
|
|
SunBeamsNode::SunBeamsNode(bNode *editor_node) : Node(editor_node)
|
2014-07-26 12:59:29 +02:00
|
|
|
{
|
|
|
|
|
/* pass */
|
|
|
|
|
}
|
|
|
|
|
|
2021-10-13 23:01:15 +02:00
|
|
|
void SunBeamsNode::convert_to_operations(NodeConverter &converter,
|
|
|
|
|
const CompositorContext & /*context*/) const
|
2014-07-26 12:59:29 +02:00
|
|
|
{
|
2021-10-13 23:01:15 +02:00
|
|
|
NodeInput *input_socket = this->get_input_socket(0);
|
|
|
|
|
NodeOutput *output_socket = this->get_output_socket(0);
|
2022-09-01 19:59:55 +02:00
|
|
|
const NodeSunBeams *data = (const NodeSunBeams *)get_bnode()->storage;
|
2014-07-26 12:59:29 +02:00
|
|
|
|
|
|
|
|
SunBeamsOperation *operation = new SunBeamsOperation();
|
2021-10-13 23:01:15 +02:00
|
|
|
operation->set_data(*data);
|
|
|
|
|
converter.add_operation(operation);
|
2014-07-26 12:59:29 +02:00
|
|
|
|
2021-10-13 23:01:15 +02:00
|
|
|
converter.map_input_socket(input_socket, operation->get_input_socket(0));
|
|
|
|
|
converter.map_output_socket(output_socket, operation->get_output_socket(0));
|
2014-07-26 12:59:29 +02:00
|
|
|
}
|
2021-03-23 17:12:27 +01:00
|
|
|
|
|
|
|
|
} // namespace blender::compositor
|