44 int outputsocketIndex,
81 int framenumber =
context.getFramenumber();
86 bool is_multilayer_ok =
false;
91 is_multilayer_ok =
true;
110 const int view_image = imageuser->view;
111 const bool is_allview = (view_image == 0);
123 view = view_image - 1;
128 switch (rpass->channels) {
130 operation = doMultilayerCheck(converter,
143 operation = doMultilayerCheck(converter,
154 operation = doMultilayerCheck(converter,
168 if (index == 0 && operation) {
173 bNodeSocket *bnodeAlphaSocket = alphaSocket->getbNodeSocket();
174 if (!
STREQ(bnodeAlphaSocket->
name,
"Alpha")) {
194 if (operation ==
nullptr) {
203 if (is_multilayer_ok ==
false) {
211 if (numberOfOutputs > 0) {
220 if (outputStraightAlpha) {
234 if (numberOfOutputs > 1) {
246 if (numberOfOutputs > 2) {
258 if (numberOfOutputs > 3) {
260 for (
int i = 3; i < numberOfOutputs; i++) {
263 switch (
output->getDataType()) {
267 operation = valueoperation;
272 vectoroperation->
setX(0.0f);
273 vectoroperation->
setY(0.0f);
274 vectoroperation->
setW(0.0f);
275 operation = vectoroperation;
284 operation = coloroperation;
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
void BKE_image_user_frame_calc(struct Image *ima, struct ImageUser *iuser, int cfra)
int BLI_listbase_count_at_most(const struct ListBase *listbase, const int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void * BLI_findstring(const struct ListBase *listbase, const char *id, const 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)
int BLI_findstringindex(const struct ListBase *listbase, const char *id, const int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define CMP_NODE_IMAGE_USE_STRAIGHT_OUTPUT
#define RE_PASSNAME_COMBINED
void setFramenumber(int framenumber)
void setImage(Image *image)
void setViewName(const char *viewName)
void setImageUser(ImageUser *imageuser)
void setRenderData(const RenderData *rd)
Overall context of the compositor.
ImageNode(bNode *editorNode)
void convertToOperations(NodeConverter &converter, const CompositorContext &context) const override
convert node to operation
NodeOperation * setInvalidOutput(NodeOutput *output)
void addPreview(NodeOperationOutput *output)
void addOperation(NodeOperation *operation)
void mapOutputSocket(NodeOutput *node_socket, NodeOperationOutput *operation_socket)
void addLink(NodeOperationOutput *from, NodeOperationInput *to)
NodeOperation contains calculation logic.
NodeOperationInput * getInputSocket(unsigned int index)
NodeOperationOutput * getOutputSocket(unsigned int index=0)
NodeOutput are sockets that can send data/input.
bNodeSocket * getbNodeSocket() const
Vector< NodeOutput * > outputs
the list of actual output-sockets
NodeOutput * getOutputSocket(const unsigned int index=0) const
bNode * getbNode() const
get the reference to the SDNA bNode struct
const Vector< NodeOutput * > & getOutputSockets() const
get access to the vector of input sockets
void setChannel(int channel)
void setChannel3(float value)
void setChannel1(float value)
void setChannel4(const float value)
void setChannel2(float value)
void setValue(float value)
DataType
possible data types for sockets
@ Vector
Vector data type.