16 void RenderLayersNode::test_socket_link(
NodeConverter &converter,
22 bool is_preview)
const
37 void RenderLayersNode::test_render_link(NodeConverter &converter,
38 const CompositorContext &
context,
45 missing_render_link(converter);
49 if (view_layer ==
nullptr) {
50 missing_render_link(converter);
55 missing_render_link(converter);
63 if (rpass ==
nullptr) {
64 missing_socket_link(converter,
output);
67 RenderLayersProg *operation;
96 is_preview =
STREQ(
output->get_bnode_socket()->name,
"Image");
102 void RenderLayersNode::missing_socket_link(NodeConverter &converter, NodeOutput *
output)
const
104 NodeOperation *operation;
105 switch (
output->get_data_type()) {
107 const float color[4] = {0.0f, 0.0f, 0.0f, 0.0f};
108 SetColorOperation *color_operation =
new SetColorOperation();
109 color_operation->set_channels(
color);
110 operation = color_operation;
114 const float vector[3] = {0.0f, 0.0f, 0.0f};
115 SetVectorOperation *vector_operation =
new SetVectorOperation();
116 vector_operation->set_vector(
vector);
117 operation = vector_operation;
121 SetValueOperation *value_operation =
new SetValueOperation();
122 value_operation->set_value(0.0f);
123 operation = value_operation;
132 converter.map_output_socket(
output, operation->get_output_socket());
133 converter.add_operation(operation);
136 void RenderLayersNode::missing_render_link(NodeConverter &converter)
const
139 missing_socket_link(converter,
output);
150 test_render_link(converter,
context, re);
154 missing_render_link(converter);
#define BLI_assert_msg(a, msg)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define RE_PASSNAME_COMBINED
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
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 are sockets that can send data/input.
bNode * get_bnode() const
get the reference to the SDNA bNode struct
const Vector< NodeOutput * > & get_output_sockets() const
get access to the vector of input sockets
Vector< NodeOutput * > outputs_
the list of actual output-sockets
void convert_to_operations(NodeConverter &converter, const CompositorContext &context) const override
convert node to operation
RenderLayersNode(bNode *editor_node)
void set_layer_id(short layer_id)
void set_view_name(const char *view_name)
void set_render_data(const RenderData *rd)
void set_scene(Scene *scene)
@ Vector
Vector data type.
ccl_global KernelShaderEvalInput ccl_global float * output
RenderResult * RE_AcquireResultRead(Render *re)
Render * RE_GetSceneRender(const Scene *scene)
RenderLayer * RE_GetRenderLayer(RenderResult *rr, const char *name)
void RE_ReleaseResult(Render *re)