17void RenderLayersNode::test_socket_link(
NodeConverter &converter,
23 bool is_preview)
const
38void RenderLayersNode::test_render_link(NodeConverter &converter,
39 const CompositorContext &context,
46 missing_render_link(converter);
50 if (view_layer ==
nullptr) {
51 missing_render_link(converter);
56 missing_render_link(converter);
64 if (rpass ==
nullptr) {
65 missing_socket_link(converter,
output);
68 RenderLayersProg *operation;
97 operation =
new RenderLayersProg(rpass->
name, type, rpass->
channels);
98 is_preview =
STREQ(
output->get_bnode_socket()->name,
"Image");
100 test_socket_link(converter, context,
output, operation, scene, layer_id, is_preview);
106 NodeOperation *operation;
107 switch (
output->get_data_type()) {
109 const float color[4] = {0.0f, 0.0f, 0.0f, 0.0f};
110 SetColorOperation *color_operation =
new SetColorOperation();
111 color_operation->set_channels(color);
112 operation = color_operation;
116 const float vector[3] = {0.0f, 0.0f, 0.0f};
117 SetVectorOperation *vector_operation =
new SetVectorOperation();
118 vector_operation->set_vector(
vector);
119 operation = vector_operation;
123 SetValueOperation *value_operation =
new SetValueOperation();
124 value_operation->set_value(0.0f);
125 operation = value_operation;
134 converter.map_output_socket(
output, operation->get_output_socket());
135 converter.add_operation(operation);
138void RenderLayersNode::missing_render_link(
NodeConverter &converter)
const
141 missing_socket_link(converter,
output);
152 test_render_link(converter, context, re);
156 missing_render_link(converter);
#define BLI_assert_msg(a, msg)
void * BLI_findstring(const struct ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findlink(const struct ListBase *listbase, int number) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
struct ViewLayer ViewLayer
struct NodeImageLayer NodeImageLayer
#define RE_PASSNAME_COMBINED
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 Brightness Control the brightness and contrast of the input color Vector Map input vector components with curves 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 Invert a color
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Gabor Generate Gabor noise Gradient Generate interpolated color and intensity values based on the input vector Magic Generate a psychedelic color texture Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a vector
struct RenderLayer RenderLayer
struct RenderPass RenderPass
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.
const bNode * get_bnode() const
get the reference to the SDNA bNode struct
Node(bNode *editor_node, bool create_sockets=true)
Span< 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)
DataType
possible data types for sockets
@ Vector
Vector data type.
RenderResult * RE_AcquireResultRead(Render *re)
RenderLayer * RE_GetRenderLayer(RenderResult *rr, const char *name)
void RE_ReleaseResult(Render *re)
Render * RE_GetSceneRender(const Scene *scene)