Blender V4.3
COM_Converter.cc
Go to the documentation of this file.
1/* SPDX-FileCopyrightText: 2011 Blender Authors
2 *
3 * SPDX-License-Identifier: GPL-2.0-or-later */
4
5#include <cstring>
6
7#include "DNA_node_types.h"
8
9#include "BKE_node.hh"
10
12
13#include "COM_AlphaOverNode.h"
16#include "COM_BlurNode.h"
17#include "COM_BokehBlurNode.h"
18#include "COM_BokehImageNode.h"
19#include "COM_BoxMaskNode.h"
20#include "COM_BrightnessNode.h"
22#include "COM_ChromaMatteNode.h"
25#include "COM_ColorCurveNode.h"
27#include "COM_ColorMatteNode.h"
28#include "COM_ColorNode.h"
29#include "COM_ColorRampNode.h"
30#include "COM_ColorSpillNode.h"
31#include "COM_ColorToBWNode.h"
34#include "COM_CombineXYZNode.h"
35#include "COM_CompositorNode.h"
39#include "COM_Converter.h"
40#include "COM_CornerPinNode.h"
41#include "COM_CropNode.h"
42#include "COM_CryptomatteNode.h"
43#include "COM_DefocusNode.h"
44#include "COM_DenoiseNode.h"
45#include "COM_DespeckleNode.h"
47#include "COM_DilateErodeNode.h"
49#include "COM_DisplaceNode.h"
52#include "COM_EllipseMaskNode.h"
53#include "COM_FileOutputNode.h"
54#include "COM_FilterNode.h"
55#include "COM_FlipNode.h"
56#include "COM_GammaNode.h"
57#include "COM_GlareNode.h"
60#include "COM_IDMaskNode.h"
61#include "COM_ImageNode.h"
62#include "COM_InpaintNode.h"
63#include "COM_InvertNode.h"
64#include "COM_KeyingNode.h"
66#include "COM_KuwaharaNode.h"
69#include "COM_MapRangeNode.h"
70#include "COM_MapUVNode.h"
71#include "COM_MapValueNode.h"
72#include "COM_MaskNode.h"
73#include "COM_MathNode.h"
74#include "COM_MixNode.h"
75#include "COM_MovieClipNode.h"
77#include "COM_NormalNode.h"
78#include "COM_NormalizeNode.h"
79#include "COM_PixelateNode.h"
81#include "COM_PosterizeNode.h"
83#include "COM_RotateNode.h"
84#include "COM_ScaleNode.h"
85#include "COM_ScaleOperation.h"
86#include "COM_SceneTimeNode.h"
89#include "COM_SeparateXYZNode.h"
90#include "COM_SetAlphaNode.h"
92#include "COM_SplitNode.h"
93#include "COM_Stabilize2dNode.h"
94#include "COM_SunBeamsNode.h"
95#include "COM_SwitchNode.h"
96#include "COM_SwitchViewNode.h"
97#include "COM_TextureNode.h"
98#include "COM_TimeNode.h"
99#include "COM_TonemapNode.h"
101#include "COM_TransformNode.h"
102#include "COM_TranslateNode.h"
104#include "COM_ValueNode.h"
105#include "COM_VectorBlurNode.h"
106#include "COM_VectorCurveNode.h"
107#include "COM_ViewLevelsNode.h"
108#include "COM_ViewerNode.h"
109#include "COM_ZCombineNode.h"
110
111namespace blender::compositor {
112
114{
115 Node *node = nullptr;
116
117 /* ignore undefined nodes with missing or invalid node data */
119 return nullptr;
120 }
121
122 switch (b_node->type) {
124 node = new CompositorNode(b_node);
125 break;
127 node = new RenderLayersNode(b_node);
128 break;
129 case CMP_NODE_TEXTURE:
130 node = new TextureNode(b_node);
131 break;
132 case CMP_NODE_RGBTOBW:
133 node = new ColorToBWNode(b_node);
134 break;
135 case CMP_NODE_MIX_RGB:
136 node = new MixNode(b_node);
137 break;
139 node = new TranslateNode(b_node);
140 break;
141 case CMP_NODE_SCALE:
142 node = new ScaleNode(b_node);
143 break;
144 case CMP_NODE_ROTATE:
145 node = new RotateNode(b_node);
146 break;
147 case CMP_NODE_FLIP:
148 node = new FlipNode(b_node);
149 break;
150 case CMP_NODE_FILTER:
151 node = new FilterNode(b_node);
152 break;
153 case CMP_NODE_ID_MASK:
154 node = new IDMaskNode(b_node);
155 break;
157 node = new BrightnessNode(b_node);
158 break;
160 node = new SeparateColorNode(b_node);
161 break;
163 node = new CombineColorNode(b_node);
164 break;
166 node = new SeparateRGBANode(b_node);
167 break;
169 node = new CombineRGBANode(b_node);
170 break;
172 node = new SeparateHSVANode(b_node);
173 break;
175 node = new CombineHSVANode(b_node);
176 break;
178 node = new SeparateYUVANode(b_node);
179 break;
181 node = new CombineYUVANode(b_node);
182 break;
184 node = new SeparateYCCANode(b_node);
185 break;
187 node = new CombineYCCANode(b_node);
188 break;
190 node = new AlphaOverNode(b_node);
191 break;
193 node = new ColorBalanceNode(b_node);
194 break;
195 case CMP_NODE_VIEWER:
196 node = new ViewerNode(b_node);
197 break;
198 case CMP_NODE_SPLIT:
199 node = new SplitNode(b_node);
200 break;
201 case CMP_NODE_INVERT:
202 node = new InvertNode(b_node);
203 break;
204 case NODE_GROUP:
205 case NODE_GROUP_INPUT:
207 /* handled in NodeCompiler */
208 break;
209 case CMP_NODE_NORMAL:
210 node = new NormalNode(b_node);
211 break;
213 node = new NormalizeNode(b_node);
214 break;
215 case CMP_NODE_IMAGE:
216 node = new ImageNode(b_node);
217 break;
219 node = new SetAlphaNode(b_node);
220 break;
222 node = new ConvertAlphaNode(b_node);
223 break;
224 case CMP_NODE_MATH:
225 node = new MathNode(b_node);
226 break;
227 case CMP_NODE_HUE_SAT:
228 node = new HueSaturationValueNode(b_node);
229 break;
231 node = new ColorCorrectionNode(b_node);
232 break;
234 node = new BoxMaskNode(b_node);
235 break;
237 node = new EllipseMaskNode(b_node);
238 break;
239 case CMP_NODE_GAMMA:
240 node = new GammaNode(b_node);
241 break;
243 node = new ColorCurveNode(b_node);
244 break;
246 node = new VectorCurveNode(b_node);
247 break;
249 node = new HueSaturationValueCorrectNode(b_node);
250 break;
251 case CMP_NODE_MAP_UV:
252 node = new MapUVNode(b_node);
253 break;
255 node = new DisplaceNode(b_node);
256 break;
258 node = new ColorRampNode(b_node);
259 break;
261 node = new DifferenceMatteNode(b_node);
262 break;
264 node = new LuminanceMatteNode(b_node);
265 break;
267 node = new DistanceMatteNode(b_node);
268 break;
270 node = new ChromaMatteNode(b_node);
271 break;
273 node = new ColorMatteNode(b_node);
274 break;
276 node = new ChannelMatteNode(b_node);
277 break;
278 case CMP_NODE_BLUR:
279 node = new BlurNode(b_node);
280 break;
282 node = new BokehImageNode(b_node);
283 break;
285 node = new BokehBlurNode(b_node);
286 break;
288 node = new DilateErodeNode(b_node);
289 break;
290 case CMP_NODE_INPAINT:
291 node = new InpaintNode(b_node);
292 break;
294 node = new DespeckleNode(b_node);
295 break;
297 node = new LensDistortionNode(b_node);
298 break;
299 case CMP_NODE_RGB:
300 node = new ColorNode(b_node);
301 break;
302 case CMP_NODE_VALUE:
303 node = new ValueNode(b_node);
304 break;
305 case CMP_NODE_TIME:
306 node = new TimeNode(b_node);
307 break;
308 case CMP_NODE_DBLUR:
309 node = new DirectionalBlurNode(b_node);
310 break;
312 node = new ZCombineNode(b_node);
313 break;
314 case CMP_NODE_TONEMAP:
315 node = new TonemapNode(b_node);
316 break;
317 case CMP_NODE_SWITCH:
318 node = new SwitchNode(b_node);
319 break;
321 node = new SwitchViewNode(b_node);
322 break;
323 case CMP_NODE_GLARE:
324 node = new GlareNode(b_node);
325 break;
327 node = new MovieClipNode(b_node);
328 break;
330 node = new ColorSpillNode(b_node);
331 break;
333 node = new FileOutputNode(b_node);
334 break;
336 node = new MapValueNode(b_node);
337 break;
339 node = new MapRangeNode(b_node);
340 break;
342 node = new TransformNode(b_node);
343 break;
345 node = new SceneTimeNode(b_node);
346 break;
348 node = new Stabilize2dNode(b_node);
349 break;
351 node = new BilateralBlurNode(b_node);
352 break;
353 case CMP_NODE_VECBLUR:
354 node = new VectorBlurNode(b_node);
355 break;
357 node = new MovieDistortionNode(b_node);
358 break;
360 node = new ViewLevelsNode(b_node);
361 break;
362 case CMP_NODE_DEFOCUS:
363 node = new DefocusNode(b_node);
364 break;
366 node = new DoubleEdgeMaskNode(b_node);
367 break;
368 case CMP_NODE_CROP:
369 node = new CropNode(b_node);
370 break;
371 case CMP_NODE_MASK:
372 node = new MaskNode(b_node);
373 break;
375 node = new KeyingScreenNode(b_node);
376 break;
377 case CMP_NODE_KEYING:
378 node = new KeyingNode(b_node);
379 break;
381 node = new TrackPositionNode(b_node);
382 break;
383 /* not implemented yet */
385 node = new PixelateNode(b_node);
386 break;
388 node = new PlaneTrackDeformNode(b_node);
389 break;
391 node = new CornerPinNode(b_node);
392 break;
394 node = new SunBeamsNode(b_node);
395 break;
397 node = new CryptomatteLegacyNode(b_node);
398 break;
400 node = new CryptomatteNode(b_node);
401 break;
402 case CMP_NODE_DENOISE:
403 node = new DenoiseNode(b_node);
404 break;
406 node = new ExposureNode(b_node);
407 break;
409 node = new AntiAliasingNode(b_node);
410 break;
412 node = new PosterizeNode(b_node);
413 break;
415 node = new ConvertColorSpaceNode(b_node);
416 break;
418 node = new SeparateXYZNode(b_node);
419 break;
421 node = new CombineXYZNode(b_node);
422 break;
424 node = new KuwaharaNode(b_node);
425 break;
426 }
427 return node;
428}
429
431{
432 /* TODO(jbakker): make the return value an #std::optional<NodeOperation>. */
433
434 const DataType src_data_type = from.get_data_type();
435 const DataType dst_data_type = to.get_data_type();
436
437 if (src_data_type == DataType::Value && dst_data_type == DataType::Color) {
438 return new ConvertValueToColorOperation();
439 }
440 if (src_data_type == DataType::Value && dst_data_type == DataType::Vector) {
442 }
443 if (src_data_type == DataType::Color && dst_data_type == DataType::Value) {
444 return new ConvertColorToValueOperation();
445 }
446 if (src_data_type == DataType::Color && dst_data_type == DataType::Vector) {
448 }
449 if (src_data_type == DataType::Vector && dst_data_type == DataType::Value) {
451 }
452 if (src_data_type == DataType::Vector && dst_data_type == DataType::Color) {
454 }
455
456 return nullptr;
457}
458
460 NodeOperationOutput *from_socket,
461 NodeOperationInput *to_socket)
462{
463 /* Data type conversions are executed before resolutions to ensure convert operations have
464 * resolution. This method have to ensure same data-types are linked for new operations. */
465 BLI_assert(from_socket->get_data_type() == to_socket->get_data_type());
466
467 ResizeMode mode = to_socket->get_resize_mode();
469
470 NodeOperation *to_operation = &to_socket->get_operation();
471 const float to_width = to_operation->get_width();
472 const float to_height = to_operation->get_height();
473 NodeOperation *from_operation = &from_socket->get_operation();
474 const float from_width = from_operation->get_width();
475 const float from_height = from_operation->get_height();
476 bool do_center = false;
477 bool do_scale = false;
478 float scaleX = 0;
479 float scaleY = 0;
480
481 switch (mode) {
482 case ResizeMode::None:
484 break;
486 do_center = true;
487 break;
489 do_center = true;
490 do_scale = true;
491 scaleX = scaleY = to_width / from_width;
492 break;
494 do_center = true;
495 do_scale = true;
496 scaleX = scaleY = to_height / from_height;
497 break;
499 do_center = true;
500 do_scale = true;
501 scaleX = to_width / from_width;
502 scaleY = to_height / from_height;
503 if (scaleX < scaleY) {
504 scaleX = scaleY;
505 }
506 else {
507 scaleY = scaleX;
508 }
509 break;
511 do_center = true;
512 do_scale = true;
513 scaleX = to_width / from_width;
514 scaleY = to_height / from_height;
515 break;
516 }
517
518 float addX = do_center ? (to_width - from_width) / 2.0f : 0.0f;
519 float addY = do_center ? (to_height - from_height) / 2.0f : 0.0f;
520 NodeOperation *first = nullptr;
521 ScaleOperation *scale_operation = nullptr;
522 if (do_scale) {
523 scale_operation = new ScaleRelativeOperation(from_socket->get_data_type());
526 first = scale_operation;
528 sxop->set_value(scaleX);
529 builder.add_link(sxop->get_output_socket(), scale_operation->get_input_socket(1));
531 syop->set_value(scaleY);
532 builder.add_link(syop->get_output_socket(), scale_operation->get_input_socket(2));
533 builder.add_operation(sxop);
534 builder.add_operation(syop);
535
536 rcti scale_canvas = from_operation->get_canvas();
537 ScaleOperation::scale_area(scale_canvas, scaleX, scaleY);
538 scale_canvas.xmax = scale_canvas.xmin + to_operation->get_width();
539 scale_canvas.ymax = scale_canvas.ymin + to_operation->get_height();
540 addX = 0;
541 addY = 0;
542 scale_operation->set_canvas(scale_canvas);
543 sxop->set_canvas(scale_canvas);
544 syop->set_canvas(scale_canvas);
545 builder.add_operation(scale_operation);
546 }
547
548 TranslateOperation *translate_operation = new TranslateOperation(to_socket->get_data_type());
549 translate_operation->get_input_socket(1)->set_resize_mode(ResizeMode::None);
550 translate_operation->get_input_socket(2)->set_resize_mode(ResizeMode::None);
551 if (!first) {
552 first = translate_operation;
553 }
555 xop->set_value(addX);
556 builder.add_link(xop->get_output_socket(), translate_operation->get_input_socket(1));
558 yop->set_value(addY);
559 builder.add_link(yop->get_output_socket(), translate_operation->get_input_socket(2));
560 builder.add_operation(xop);
561 builder.add_operation(yop);
562
563 rcti translate_canvas = to_operation->get_canvas();
564 if (mode == ResizeMode::Align) {
565 translate_canvas.xmax = translate_canvas.xmin + from_width;
566 translate_canvas.ymax = translate_canvas.ymin + from_height;
567 }
568 translate_operation->set_canvas(translate_canvas);
569 xop->set_canvas(translate_canvas);
570 yop->set_canvas(translate_canvas);
571 builder.add_operation(translate_operation);
572
573 if (do_scale) {
574 translate_operation->get_input_socket(0)->set_resize_mode(ResizeMode::None);
575 builder.add_link(scale_operation->get_output_socket(),
576 translate_operation->get_input_socket(0));
577 }
578
579 /* remove previous link and replace */
580 builder.remove_input_link(to_socket);
583 builder.add_link(from_socket, first->get_input_socket(0));
584 builder.add_link(translate_operation->get_output_socket(), to_socket);
585}
586
587} // namespace blender::compositor
#define CMP_NODE_PREMULKEY
Definition BKE_node.hh:1068
#define CMP_NODE_DENOISE
Definition BKE_node.hh:1109
#define CMP_NODE_VALTORGB
Definition BKE_node.hh:1016
#define CMP_NODE_MASK
Definition BKE_node.hh:1081
#define CMP_NODE_SCALE
Definition BKE_node.hh:1041
#define CMP_NODE_EXPOSURE
Definition BKE_node.hh:1110
#define CMP_NODE_COMBINE_XYZ
Definition BKE_node.hh:1116
#define CMP_NODE_COMPOSITE
Definition BKE_node.hh:1033
#define CMP_NODE_MIX_RGB
Definition BKE_node.hh:1015
#define CMP_NODE_VECBLUR
Definition BKE_node.hh:1026
#define CMP_NODE_MAP_RANGE
Definition BKE_node.hh:1104
#define CMP_NODE_SEPHSVA_LEGACY
Definition BKE_node.hh:1028
#define CMP_NODE_TIME
Definition BKE_node.hh:1025
#define CMP_NODE_COLOR_SPILL
Definition BKE_node.hh:1047
#define CMP_NODE_DESPECKLE
Definition BKE_node.hh:1086
#define CMP_NODE_VIEWER
Definition BKE_node.hh:1012
#define CMP_NODE_LUMA_MATTE
Definition BKE_node.hh:1060
#define CMP_NODE_CORNERPIN
Definition BKE_node.hh:1106
#define CMP_NODE_KEYINGSCREEN
Definition BKE_node.hh:1082
#define CMP_NODE_MASK_ELLIPSE
Definition BKE_node.hh:1098
#define CMP_NODE_DISPLACE
Definition BKE_node.hh:1057
#define CMP_NODE_COMBYCCA_LEGACY
Definition BKE_node.hh:1043
#define CMP_NODE_RGBTOBW
Definition BKE_node.hh:1017
#define CMP_NODE_SEPRGBA_LEGACY
Definition BKE_node.hh:1027
#define CMP_NODE_SEPARATE_COLOR
Definition BKE_node.hh:1118
#define CMP_NODE_CRYPTOMATTE
Definition BKE_node.hh:1111
#define CMP_NODE_BILATERALBLUR
Definition BKE_node.hh:1067
#define CMP_NODE_MAP_VALUE
Definition BKE_node.hh:1024
#define CMP_NODE_TRANSLATE
Definition BKE_node.hh:1036
#define CMP_NODE_MOVIEDISTORTION
Definition BKE_node.hh:1077
#define CMP_NODE_TONEMAP
Definition BKE_node.hh:1092
#define CMP_NODE_INPAINT
Definition BKE_node.hh:1085
#define CMP_NODE_COLORBALANCE
Definition BKE_node.hh:1072
#define CMP_NODE_HUE_SAT
Definition BKE_node.hh:1030
#define CMP_NODE_BOKEHIMAGE
Definition BKE_node.hh:1099
#define CMP_NODE_COMBYUVA_LEGACY
Definition BKE_node.hh:1045
#define CMP_NODE_ROTATE
Definition BKE_node.hh:1040
#define CMP_NODE_KUWAHARA
Definition BKE_node.hh:1088
#define CMP_NODE_FILTER
Definition BKE_node.hh:1023
#define CMP_NODE_DIFF_MATTE
Definition BKE_node.hh:1046
#define CMP_NODE_GAMMA
Definition BKE_node.hh:1062
#define CMP_NODE_ALPHAOVER
Definition BKE_node.hh:1021
#define CMP_NODE_TEXTURE
Definition BKE_node.hh:1035
#define CMP_NODE_HUECORRECT
Definition BKE_node.hh:1073
#define CMP_NODE_SEPYUVA_LEGACY
Definition BKE_node.hh:1044
#define CMP_NODE_COMBHSVA_LEGACY
Definition BKE_node.hh:1058
#define CMP_NODE_CROP
Definition BKE_node.hh:1065
#define CMP_NODE_CHROMA_MATTE
Definition BKE_node.hh:1048
#define CMP_NODE_GLARE
Definition BKE_node.hh:1091
#define CMP_NODE_PLANETRACKDEFORM
Definition BKE_node.hh:1105
#define CMP_NODE_MOVIECLIP
Definition BKE_node.hh:1074
#define CMP_NODE_TRANSFORM
Definition BKE_node.hh:1076
#define CMP_NODE_DILATEERODE
Definition BKE_node.hh:1039
#define CMP_NODE_SPLIT
Definition BKE_node.hh:1089
#define NODE_GROUP_OUTPUT
Definition BKE_node.hh:806
#define CMP_NODE_SCENE_TIME
Definition BKE_node.hh:1114
#define CMP_NODE_ID_MASK
Definition BKE_node.hh:1055
#define CMP_NODE_BOKEHBLUR
Definition BKE_node.hh:1100
#define CMP_NODE_LENSDIST
Definition BKE_node.hh:1093
#define CMP_NODE_NORMALIZE
Definition BKE_node.hh:1064
#define CMP_NODE_VALUE
Definition BKE_node.hh:1014
#define CMP_NODE_ZCOMBINE
Definition BKE_node.hh:1037
#define CMP_NODE_MATH
Definition BKE_node.hh:1059
#define CMP_NODE_MAP_UV
Definition BKE_node.hh:1054
#define CMP_NODE_CRYPTOMATTE_LEGACY
Definition BKE_node.hh:1108
#define CMP_NODE_TRACKPOS
Definition BKE_node.hh:1084
#define CMP_NODE_SWITCH_VIEW
Definition BKE_node.hh:1107
#define CMP_NODE_OUTPUT_FILE
Definition BKE_node.hh:1034
#define CMP_NODE_COLORCORRECTION
Definition BKE_node.hh:1096
#define CMP_NODE_SETALPHA
Definition BKE_node.hh:1029
#define CMP_NODE_CURVE_RGB
Definition BKE_node.hh:1020
#define CMP_NODE_DOUBLEEDGEMASK
Definition BKE_node.hh:1078
#define CMP_NODE_STABILIZE2D
Definition BKE_node.hh:1075
#define CMP_NODE_PIXELATE
Definition BKE_node.hh:1102
#define CMP_NODE_COMBINE_COLOR
Definition BKE_node.hh:1117
#define CMP_NODE_SWITCH
Definition BKE_node.hh:1101
#define CMP_NODE_COMBRGBA_LEGACY
Definition BKE_node.hh:1038
#define NODE_GROUP
Definition BKE_node.hh:800
#define CMP_NODE_RGB
Definition BKE_node.hh:1013
#define CMP_NODE_MASK_BOX
Definition BKE_node.hh:1097
#define CMP_NODE_DEFOCUS
Definition BKE_node.hh:1056
#define CMP_NODE_KEYING
Definition BKE_node.hh:1083
#define CMP_NODE_SEPARATE_XYZ
Definition BKE_node.hh:1115
#define CMP_NODE_POSTERIZE
Definition BKE_node.hh:1112
#define CMP_NODE_CONVERT_COLOR_SPACE
Definition BKE_node.hh:1113
#define CMP_NODE_ANTIALIASING
Definition BKE_node.hh:1087
#define CMP_NODE_R_LAYERS
Definition BKE_node.hh:1032
#define CMP_NODE_CURVE_VEC
Definition BKE_node.hh:1019
#define CMP_NODE_SEPYCCA_LEGACY
Definition BKE_node.hh:1042
#define CMP_NODE_INVERT
Definition BKE_node.hh:1063
#define CMP_NODE_COLOR_MATTE
Definition BKE_node.hh:1071
#define NODE_GROUP_INPUT
Definition BKE_node.hh:805
#define CMP_NODE_DIST_MATTE
Definition BKE_node.hh:1069
#define CMP_NODE_SUNBEAMS
Definition BKE_node.hh:1094
#define CMP_NODE_IMAGE
Definition BKE_node.hh:1031
#define CMP_NODE_NORMAL
Definition BKE_node.hh:1018
#define CMP_NODE_DBLUR
Definition BKE_node.hh:1066
#define CMP_NODE_VIEW_LEVELS
Definition BKE_node.hh:1070
#define CMP_NODE_BLUR
Definition BKE_node.hh:1022
#define CMP_NODE_BRIGHTCONTRAST
Definition BKE_node.hh:1061
#define CMP_NODE_FLIP
Definition BKE_node.hh:1050
#define CMP_NODE_CHANNEL_MATTE
Definition BKE_node.hh:1049
#define BLI_assert(a)
Definition BLI_assert.h:50
void add_link(NodeOperationOutput *from, NodeOperationInput *to)
void set_resize_mode(ResizeMode resize_mode)
NodeOperation contains calculation logic.
void set_canvas(const rcti &canvas_area)
NodeOperationOutput * get_output_socket(unsigned int index=0)
NodeOperationInput * get_input_socket(unsigned int index)
static void scale_area(rcti &area, float relative_scale_x, float relative_scale_y)
OperationNode * node
DataType
possible data types for sockets
Definition COM_defines.h:21
ResizeMode
Resize modes of inputsockets How are the input and working resolutions matched.
@ Vector
Vector data type.
@ FitAny
Fit the width or the height of the input image to the width or height of the working area of the node...
@ FitWidth
Fit the width of the input image to the width of the working area of the node.
@ Center
Center the input image to the center of the working area of the node, no resizing occurs.
@ FitHeight
Fit the height of the input image to the height of the working area of the node.
@ Stretch
Fit the width and the height of the input image to the width and height of the working area of the no...
bool node_type_is_undefined(const bNode *node)
Definition node.cc:1736
NodeOperation * COM_convert_data_type(const NodeOperationOutput &from, const NodeOperationInput &to)
This function will add a date-type conversion rule when the to-socket does not support the from-socke...
void COM_convert_canvas(NodeOperationBuilder &builder, NodeOperationOutput *from_socket, NodeOperationInput *to_socket)
This function will add a resolution rule based on the settings of the NodeInput.
Node * COM_convert_bnode(bNode *b_node)
Wraps a bNode in its Node instance.
int16_t type
int ymin
int ymax
int xmin
int xmax