Blender  V3.3
COM_BokehImageNode.cc
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later
2  * Copyright 2011 Blender Foundation. */
3 
4 #include "COM_BokehImageNode.h"
6 
7 namespace blender::compositor {
8 
9 BokehImageNode::BokehImageNode(bNode *editor_node) : Node(editor_node)
10 {
11  /* pass */
12 }
13 
15  const CompositorContext & /*context*/) const
16 {
17  BokehImageOperation *operation = new BokehImageOperation();
18  operation->set_data((NodeBokehImage *)this->get_bnode()->storage);
19 
20  converter.add_operation(operation);
21  converter.map_output_socket(get_output_socket(0), operation->get_output_socket(0));
22 
23  converter.add_preview(operation->get_output_socket(0));
24 }
25 
26 } // namespace blender::compositor
void convert_to_operations(NodeConverter &converter, const CompositorContext &context) const override
convert node to operation
The BokehImageOperation class is an operation that creates an image useful to mimic the internals of ...
void set_data(NodeBokehImage *data)
set the node data
Overall context of the compositor.
void map_output_socket(NodeOutput *node_socket, NodeOperationOutput *operation_socket)
void add_preview(NodeOperationOutput *output)
void add_operation(NodeOperation *operation)
NodeOperationOutput * get_output_socket(unsigned int index=0)
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