Blender  V2.93
COM_Converter.cc
Go to the documentation of this file.
1 /*
2  * This program is free software; you can redistribute it and/or
3  * modify it under the terms of the GNU General Public License
4  * as published by the Free Software Foundation; either version 2
5  * of the License, or (at your option) any later version.
6  *
7  * This program is distributed in the hope that it will be useful,
8  * but WITHOUT ANY WARRANTY; without even the implied warranty of
9  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10  * GNU General Public License for more details.
11  *
12  * You should have received a copy of the GNU General Public License
13  * along with this program; if not, write to the Free Software Foundation,
14  * Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
15  *
16  * Copyright 2011, Blender Foundation.
17  */
18 
19 #include <cstring>
20 
21 #include "DNA_node_types.h"
22 
23 #include "BKE_node.h"
24 
25 #include "COM_NodeOperation.h"
27 
28 #include "COM_AlphaOverNode.h"
29 #include "COM_AntiAliasingNode.h"
30 #include "COM_BilateralBlurNode.h"
31 #include "COM_BlurNode.h"
32 #include "COM_BokehBlurNode.h"
33 #include "COM_BokehImageNode.h"
34 #include "COM_BoxMaskNode.h"
35 #include "COM_BrightnessNode.h"
36 #include "COM_ChannelMatteNode.h"
37 #include "COM_ChromaMatteNode.h"
38 #include "COM_ColorBalanceNode.h"
40 #include "COM_ColorCurveNode.h"
41 #include "COM_ColorExposureNode.h"
42 #include "COM_ColorMatteNode.h"
43 #include "COM_ColorNode.h"
44 #include "COM_ColorRampNode.h"
45 #include "COM_ColorSpillNode.h"
46 #include "COM_ColorToBWNode.h"
47 #include "COM_CombineColorNode.h"
48 #include "COM_CompositorNode.h"
49 #include "COM_ConvertAlphaNode.h"
50 #include "COM_ConvertOperation.h"
51 #include "COM_Converter.h"
52 #include "COM_CornerPinNode.h"
53 #include "COM_CropNode.h"
54 #include "COM_CryptomatteNode.h"
55 #include "COM_DefocusNode.h"
56 #include "COM_DenoiseNode.h"
57 #include "COM_DespeckleNode.h"
59 #include "COM_DilateErodeNode.h"
61 #include "COM_DisplaceNode.h"
62 #include "COM_DistanceMatteNode.h"
63 #include "COM_DoubleEdgeMaskNode.h"
64 #include "COM_EllipseMaskNode.h"
65 #include "COM_ExecutionSystem.h"
66 #include "COM_FilterNode.h"
67 #include "COM_FlipNode.h"
68 #include "COM_GammaNode.h"
69 #include "COM_GlareNode.h"
72 #include "COM_IDMaskNode.h"
73 #include "COM_ImageNode.h"
74 #include "COM_InpaintNode.h"
75 #include "COM_InvertNode.h"
76 #include "COM_KeyingNode.h"
77 #include "COM_KeyingScreenNode.h"
78 #include "COM_LensDistortionNode.h"
79 #include "COM_LuminanceMatteNode.h"
80 #include "COM_MapRangeNode.h"
81 #include "COM_MapUVNode.h"
82 #include "COM_MapValueNode.h"
83 #include "COM_MaskNode.h"
84 #include "COM_MathNode.h"
85 #include "COM_MixNode.h"
86 #include "COM_MovieClipNode.h"
88 #include "COM_NormalNode.h"
89 #include "COM_NormalizeNode.h"
90 #include "COM_OutputFileNode.h"
91 #include "COM_PixelateNode.h"
93 #include "COM_RenderLayersNode.h"
94 #include "COM_RotateNode.h"
95 #include "COM_ScaleNode.h"
96 #include "COM_ScaleOperation.h"
97 #include "COM_SeparateColorNode.h"
98 #include "COM_SetAlphaNode.h"
99 #include "COM_SetValueOperation.h"
100 #include "COM_SplitViewerNode.h"
101 #include "COM_Stabilize2dNode.h"
102 #include "COM_SunBeamsNode.h"
103 #include "COM_SwitchNode.h"
104 #include "COM_SwitchViewNode.h"
105 #include "COM_TextureNode.h"
106 #include "COM_TimeNode.h"
107 #include "COM_TonemapNode.h"
108 #include "COM_TrackPositionNode.h"
109 #include "COM_TransformNode.h"
110 #include "COM_TranslateNode.h"
111 #include "COM_TranslateOperation.h"
112 #include "COM_ValueNode.h"
113 #include "COM_VectorBlurNode.h"
114 #include "COM_VectorCurveNode.h"
115 #include "COM_ViewLevelsNode.h"
116 #include "COM_ViewerNode.h"
117 #include "COM_ZCombineNode.h"
118 
119 namespace blender::compositor {
120 
121 bool COM_bnode_is_fast_node(const bNode &b_node)
122 {
123  return !ELEM(b_node.type,
136 }
137 
139 {
140  Node *node = nullptr;
141 
142  /* ignore undefined nodes with missing or invalid node data */
143  if (nodeTypeUndefined(b_node)) {
144  return nullptr;
145  }
146 
147  switch (b_node->type) {
148  case CMP_NODE_COMPOSITE:
149  node = new CompositorNode(b_node);
150  break;
151  case CMP_NODE_R_LAYERS:
152  node = new RenderLayersNode(b_node);
153  break;
154  case CMP_NODE_TEXTURE:
155  node = new TextureNode(b_node);
156  break;
157  case CMP_NODE_RGBTOBW:
158  node = new ColorToBWNode(b_node);
159  break;
160  case CMP_NODE_MIX_RGB:
161  node = new MixNode(b_node);
162  break;
163  case CMP_NODE_TRANSLATE:
164  node = new TranslateNode(b_node);
165  break;
166  case CMP_NODE_SCALE:
167  node = new ScaleNode(b_node);
168  break;
169  case CMP_NODE_ROTATE:
170  node = new RotateNode(b_node);
171  break;
172  case CMP_NODE_FLIP:
173  node = new FlipNode(b_node);
174  break;
175  case CMP_NODE_FILTER:
176  node = new FilterNode(b_node);
177  break;
178  case CMP_NODE_ID_MASK:
179  node = new IDMaskNode(b_node);
180  break;
182  node = new BrightnessNode(b_node);
183  break;
184  case CMP_NODE_SEPRGBA:
185  node = new SeparateRGBANode(b_node);
186  break;
187  case CMP_NODE_COMBRGBA:
188  node = new CombineRGBANode(b_node);
189  break;
190  case CMP_NODE_SEPHSVA:
191  node = new SeparateHSVANode(b_node);
192  break;
193  case CMP_NODE_COMBHSVA:
194  node = new CombineHSVANode(b_node);
195  break;
196  case CMP_NODE_SEPYUVA:
197  node = new SeparateYUVANode(b_node);
198  break;
199  case CMP_NODE_COMBYUVA:
200  node = new CombineYUVANode(b_node);
201  break;
202  case CMP_NODE_SEPYCCA:
203  node = new SeparateYCCANode(b_node);
204  break;
205  case CMP_NODE_COMBYCCA:
206  node = new CombineYCCANode(b_node);
207  break;
208  case CMP_NODE_ALPHAOVER:
209  node = new AlphaOverNode(b_node);
210  break;
212  node = new ColorBalanceNode(b_node);
213  break;
214  case CMP_NODE_VIEWER:
215  node = new ViewerNode(b_node);
216  break;
218  node = new SplitViewerNode(b_node);
219  break;
220  case CMP_NODE_INVERT:
221  node = new InvertNode(b_node);
222  break;
223  case NODE_GROUP:
224  case NODE_GROUP_INPUT:
225  case NODE_GROUP_OUTPUT:
226  /* handled in NodeCompiler */
227  break;
228  case CMP_NODE_NORMAL:
229  node = new NormalNode(b_node);
230  break;
231  case CMP_NODE_NORMALIZE:
232  node = new NormalizeNode(b_node);
233  break;
234  case CMP_NODE_IMAGE:
235  node = new ImageNode(b_node);
236  break;
237  case CMP_NODE_SETALPHA:
238  node = new SetAlphaNode(b_node);
239  break;
240  case CMP_NODE_PREMULKEY:
241  node = new ConvertAlphaNode(b_node);
242  break;
243  case CMP_NODE_MATH:
244  node = new MathNode(b_node);
245  break;
246  case CMP_NODE_HUE_SAT:
247  node = new HueSaturationValueNode(b_node);
248  break;
250  node = new ColorCorrectionNode(b_node);
251  break;
252  case CMP_NODE_MASK_BOX:
253  node = new BoxMaskNode(b_node);
254  break;
256  node = new EllipseMaskNode(b_node);
257  break;
258  case CMP_NODE_GAMMA:
259  node = new GammaNode(b_node);
260  break;
261  case CMP_NODE_CURVE_RGB:
262  node = new ColorCurveNode(b_node);
263  break;
264  case CMP_NODE_CURVE_VEC:
265  node = new VectorCurveNode(b_node);
266  break;
267  case CMP_NODE_HUECORRECT:
268  node = new HueSaturationValueCorrectNode(b_node);
269  break;
270  case CMP_NODE_MAP_UV:
271  node = new MapUVNode(b_node);
272  break;
273  case CMP_NODE_DISPLACE:
274  node = new DisplaceNode(b_node);
275  break;
276  case CMP_NODE_VALTORGB:
277  node = new ColorRampNode(b_node);
278  break;
279  case CMP_NODE_DIFF_MATTE:
280  node = new DifferenceMatteNode(b_node);
281  break;
282  case CMP_NODE_LUMA_MATTE:
283  node = new LuminanceMatteNode(b_node);
284  break;
285  case CMP_NODE_DIST_MATTE:
286  node = new DistanceMatteNode(b_node);
287  break;
289  node = new ChromaMatteNode(b_node);
290  break;
292  node = new ColorMatteNode(b_node);
293  break;
295  node = new ChannelMatteNode(b_node);
296  break;
297  case CMP_NODE_BLUR:
298  node = new BlurNode(b_node);
299  break;
300  case CMP_NODE_BOKEHIMAGE:
301  node = new BokehImageNode(b_node);
302  break;
303  case CMP_NODE_BOKEHBLUR:
304  node = new BokehBlurNode(b_node);
305  break;
307  node = new DilateErodeNode(b_node);
308  break;
309  case CMP_NODE_INPAINT:
310  node = new InpaintNode(b_node);
311  break;
312  case CMP_NODE_DESPECKLE:
313  node = new DespeckleNode(b_node);
314  break;
315  case CMP_NODE_LENSDIST:
316  node = new LensDistortionNode(b_node);
317  break;
318  case CMP_NODE_RGB:
319  node = new ColorNode(b_node);
320  break;
321  case CMP_NODE_VALUE:
322  node = new ValueNode(b_node);
323  break;
324  case CMP_NODE_TIME:
325  node = new TimeNode(b_node);
326  break;
327  case CMP_NODE_DBLUR:
328  node = new DirectionalBlurNode(b_node);
329  break;
330  case CMP_NODE_ZCOMBINE:
331  node = new ZCombineNode(b_node);
332  break;
333  case CMP_NODE_TONEMAP:
334  node = new TonemapNode(b_node);
335  break;
336  case CMP_NODE_SWITCH:
337  node = new SwitchNode(b_node);
338  break;
340  node = new SwitchViewNode(b_node);
341  break;
342  case CMP_NODE_GLARE:
343  node = new GlareNode(b_node);
344  break;
345  case CMP_NODE_MOVIECLIP:
346  node = new MovieClipNode(b_node);
347  break;
349  node = new ColorSpillNode(b_node);
350  break;
352  node = new OutputFileNode(b_node);
353  break;
354  case CMP_NODE_MAP_VALUE:
355  node = new MapValueNode(b_node);
356  break;
357  case CMP_NODE_MAP_RANGE:
358  node = new MapRangeNode(b_node);
359  break;
360  case CMP_NODE_TRANSFORM:
361  node = new TransformNode(b_node);
362  break;
364  node = new Stabilize2dNode(b_node);
365  break;
367  node = new BilateralBlurNode(b_node);
368  break;
369  case CMP_NODE_VECBLUR:
370  node = new VectorBlurNode(b_node);
371  break;
373  node = new MovieDistortionNode(b_node);
374  break;
376  node = new ViewLevelsNode(b_node);
377  break;
378  case CMP_NODE_DEFOCUS:
379  node = new DefocusNode(b_node);
380  break;
382  node = new DoubleEdgeMaskNode(b_node);
383  break;
384  case CMP_NODE_CROP:
385  node = new CropNode(b_node);
386  break;
387  case CMP_NODE_MASK:
388  node = new MaskNode(b_node);
389  break;
391  node = new KeyingScreenNode(b_node);
392  break;
393  case CMP_NODE_KEYING:
394  node = new KeyingNode(b_node);
395  break;
396  case CMP_NODE_TRACKPOS:
397  node = new TrackPositionNode(b_node);
398  break;
399  /* not implemented yet */
400  case CMP_NODE_PIXELATE:
401  node = new PixelateNode(b_node);
402  break;
404  node = new PlaneTrackDeformNode(b_node);
405  break;
406  case CMP_NODE_CORNERPIN:
407  node = new CornerPinNode(b_node);
408  break;
409  case CMP_NODE_SUNBEAMS:
410  node = new SunBeamsNode(b_node);
411  break;
413  node = new CryptomatteLegacyNode(b_node);
414  break;
416  node = new CryptomatteNode(b_node);
417  break;
418  case CMP_NODE_DENOISE:
419  node = new DenoiseNode(b_node);
420  break;
421  case CMP_NODE_EXPOSURE:
422  node = new ExposureNode(b_node);
423  break;
425  node = new AntiAliasingNode(b_node);
426  break;
427  }
428  return node;
429 }
430 
431 /* TODO(jbakker): make this an std::optional<NodeOperation>. */
433 {
434  const DataType src_data_type = from.getDataType();
435  const DataType dst_data_type = to.getDataType();
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) {
441  return new ConvertValueToVectorOperation();
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) {
447  return new ConvertColorToVectorOperation();
448  }
449  if (src_data_type == DataType::Vector && dst_data_type == DataType::Value) {
450  return new ConvertVectorToValueOperation();
451  }
452  if (src_data_type == DataType::Vector && dst_data_type == DataType::Color) {
453  return new ConvertVectorToColorOperation();
454  }
455 
456  return nullptr;
457 }
458 
460  NodeOperationOutput *fromSocket,
461  NodeOperationInput *toSocket)
462 {
463  ResizeMode mode = toSocket->getResizeMode();
464 
465  NodeOperation *toOperation = &toSocket->getOperation();
466  const float toWidth = toOperation->getWidth();
467  const float toHeight = toOperation->getHeight();
468  NodeOperation *fromOperation = &fromSocket->getOperation();
469  const float fromWidth = fromOperation->getWidth();
470  const float fromHeight = fromOperation->getHeight();
471  bool doCenter = false;
472  bool doScale = false;
473  float addX = (toWidth - fromWidth) / 2.0f;
474  float addY = (toHeight - fromHeight) / 2.0f;
475  float scaleX = 0;
476  float scaleY = 0;
477 
478  switch (mode) {
479  case ResizeMode::None:
480  break;
481  case ResizeMode::Center:
482  doCenter = true;
483  break;
485  doCenter = true;
486  doScale = true;
487  scaleX = scaleY = toWidth / fromWidth;
488  break;
490  doCenter = true;
491  doScale = true;
492  scaleX = scaleY = toHeight / fromHeight;
493  break;
494  case ResizeMode::FitAny:
495  doCenter = true;
496  doScale = true;
497  scaleX = toWidth / fromWidth;
498  scaleY = toHeight / fromHeight;
499  if (scaleX < scaleY) {
500  scaleX = scaleY;
501  }
502  else {
503  scaleY = scaleX;
504  }
505  break;
506  case ResizeMode::Stretch:
507  doCenter = true;
508  doScale = true;
509  scaleX = toWidth / fromWidth;
510  scaleY = toHeight / fromHeight;
511  break;
512  }
513 
514  if (doCenter) {
515  NodeOperation *first = nullptr;
516  ScaleOperation *scaleOperation = nullptr;
517  if (doScale) {
518  scaleOperation = new ScaleOperation();
519  scaleOperation->getInputSocket(1)->setResizeMode(ResizeMode::None);
520  scaleOperation->getInputSocket(2)->setResizeMode(ResizeMode::None);
521  first = scaleOperation;
522  SetValueOperation *sxop = new SetValueOperation();
523  sxop->setValue(scaleX);
524  builder.addLink(sxop->getOutputSocket(), scaleOperation->getInputSocket(1));
525  SetValueOperation *syop = new SetValueOperation();
526  syop->setValue(scaleY);
527  builder.addLink(syop->getOutputSocket(), scaleOperation->getInputSocket(2));
528  builder.addOperation(sxop);
529  builder.addOperation(syop);
530 
531  unsigned int resolution[2] = {fromOperation->getWidth(), fromOperation->getHeight()};
532  scaleOperation->setResolution(resolution);
533  sxop->setResolution(resolution);
534  syop->setResolution(resolution);
535  builder.addOperation(scaleOperation);
536  }
537 
538  TranslateOperation *translateOperation = new TranslateOperation();
539  translateOperation->getInputSocket(1)->setResizeMode(ResizeMode::None);
540  translateOperation->getInputSocket(2)->setResizeMode(ResizeMode::None);
541  if (!first) {
542  first = translateOperation;
543  }
545  xop->setValue(addX);
546  builder.addLink(xop->getOutputSocket(), translateOperation->getInputSocket(1));
548  yop->setValue(addY);
549  builder.addLink(yop->getOutputSocket(), translateOperation->getInputSocket(2));
550  builder.addOperation(xop);
551  builder.addOperation(yop);
552 
553  unsigned int resolution[2] = {toOperation->getWidth(), toOperation->getHeight()};
554  translateOperation->setResolution(resolution);
555  xop->setResolution(resolution);
556  yop->setResolution(resolution);
557  builder.addOperation(translateOperation);
558 
559  if (doScale) {
560  translateOperation->getInputSocket(0)->setResizeMode(ResizeMode::None);
561  builder.addLink(scaleOperation->getOutputSocket(), translateOperation->getInputSocket(0));
562  }
563 
564  /* remove previous link and replace */
565  builder.removeInputLink(toSocket);
567  toSocket->setResizeMode(ResizeMode::None);
568  builder.addLink(fromSocket, first->getInputSocket(0));
569  builder.addLink(translateOperation->getOutputSocket(), toSocket);
570  }
571 }
572 
573 } // namespace blender::compositor
#define CMP_NODE_EXPOSURE
Definition: BKE_node.h:1227
#define CMP_NODE_MIX_RGB
Definition: BKE_node.h:1135
#define CMP_NODE_VECBLUR
Definition: BKE_node.h:1146
#define CMP_NODE_MAP_RANGE
Definition: BKE_node.h:1221
bool nodeTypeUndefined(struct bNode *node)
Definition: node.cc:1316
#define CMP_NODE_KEYINGSCREEN
Definition: BKE_node.h:1201
#define CMP_NODE_DISPLACE
Definition: BKE_node.h:1176
#define CMP_NODE_RGBTOBW
Definition: BKE_node.h:1137
#define CMP_NODE_BILATERALBLUR
Definition: BKE_node.h:1186
#define CMP_NODE_TRANSLATE
Definition: BKE_node.h:1156
#define CMP_NODE_INPAINT
Definition: BKE_node.h:1204
#define CMP_NODE_SEPYCCA
Definition: BKE_node.h:1162
#define CMP_NODE_COLORBALANCE
Definition: BKE_node.h:1191
#define CMP_NODE_HUE_SAT
Definition: BKE_node.h:1150
#define CMP_NODE_BOKEHIMAGE
Definition: BKE_node.h:1216
#define CMP_NODE_ROTATE
Definition: BKE_node.h:1160
#define CMP_NODE_FILTER
Definition: BKE_node.h:1143
#define CMP_NODE_DIFF_MATTE
Definition: BKE_node.h:1166
#define CMP_NODE_ALPHAOVER
Definition: BKE_node.h:1141
#define CMP_NODE_CROP
Definition: BKE_node.h:1184
#define CMP_NODE_CHROMA_MATTE
Definition: BKE_node.h:1168
#define CMP_NODE_GLARE
Definition: BKE_node.h:1208
#define CMP_NODE_PLANETRACKDEFORM
Definition: BKE_node.h:1222
#define CMP_NODE_MOVIECLIP
Definition: BKE_node.h:1193
#define CMP_NODE_LENSDIST
Definition: BKE_node.h:1210
#define CMP_NODE_MATH
Definition: BKE_node.h:1178
#define CMP_NODE_MAP_UV
Definition: BKE_node.h:1173
#define CMP_NODE_CRYPTOMATTE_LEGACY
Definition: BKE_node.h:1225
#define CMP_NODE_TRACKPOS
Definition: BKE_node.h:1203
#define CMP_NODE_OUTPUT_FILE
Definition: BKE_node.h:1154
#define CMP_NODE_COLORCORRECTION
Definition: BKE_node.h:1213
#define CMP_NODE_DOUBLEEDGEMASK
Definition: BKE_node.h:1197
#define CMP_NODE_STABILIZE2D
Definition: BKE_node.h:1194
#define CMP_NODE_COMBRGBA
Definition: BKE_node.h:1158
#define CMP_NODE_SWITCH
Definition: BKE_node.h:1218
#define CMP_NODE_RGB
Definition: BKE_node.h:1133
#define CMP_NODE_MASK_BOX
Definition: BKE_node.h:1214
#define CMP_NODE_R_LAYERS
Definition: BKE_node.h:1152
#define CMP_NODE_CURVE_VEC
Definition: BKE_node.h:1139
#define CMP_NODE_INVERT
Definition: BKE_node.h:1182
#define CMP_NODE_COLOR_MATTE
Definition: BKE_node.h:1190
#define NODE_GROUP_INPUT
Definition: BKE_node.h:874
#define CMP_NODE_SUNBEAMS
Definition: BKE_node.h:1211
#define CMP_NODE_SEPHSVA
Definition: BKE_node.h:1148
#define CMP_NODE_SEPYUVA
Definition: BKE_node.h:1164
#define CMP_NODE_BRIGHTCONTRAST
Definition: BKE_node.h:1180
#define CMP_NODE_FLIP
Definition: BKE_node.h:1170
#define ELEM(...)
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel CMP_NODE_SPLITVIEWER
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner CMP_NODE_CRYPTOMATTE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate CMP_NODE_SETALPHA
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White CMP_NODE_CURVE_RGB
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha CMP_NODE_TONEMAP
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional CMP_NODE_PREMULKEY
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB CMP_NODE_BLUR
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White CMP_NODE_NORMAL
NODE_GROUP_OUTPUT
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set CMP_NODE_ZCOMBINE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View CMP_NODE_KEYING
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh CMP_NODE_SWITCH_VIEW
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha CMP_NODE_VIEW_LEVELS
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View CMP_NODE_PIXELATE
NODE_GROUP
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID CMP_NODE_DEFOCUS
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White CMP_NODE_VIEWER
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue CMP_NODE_TRANSFORM
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance CMP_NODE_HUECORRECT
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate CMP_NODE_SCALE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance CMP_NODE_NORMALIZE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner CMP_NODE_DENOISE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner CMP_NODE_ANTIALIASING
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White CMP_NODE_VALTORGB
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate CMP_NODE_DESPECKLE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map CMP_NODE_TIME
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color CMP_NODE_CHANNEL_MATTE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID CMP_NODE_COMBHSVA
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map CMP_NODE_SEPRGBA
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View CMP_NODE_MASK
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse CMP_NODE_BOKEHBLUR
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance CMP_NODE_DBLUR
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View CMP_NODE_CORNERPIN
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha CMP_NODE_DIST_MATTE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance CMP_NODE_GAMMA
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z CMP_NODE_DILATEERODE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate CMP_NODE_COMBYCCA
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White CMP_NODE_VALUE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB CMP_NODE_MAP_VALUE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine CMP_NODE_COLOR_SPILL
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set CMP_NODE_COMPOSITE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue CMP_NODE_MOVIEDISTORTION
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split CMP_NODE_ID_MASK
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine Luminance Directional Alpha Distance Hue Movie CMP_NODE_MASK_ELLIPSE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set CMP_NODE_TEXTURE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set CMP_NODE_IMAGE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine Combine Color Channel Split ID Combine CMP_NODE_LUMA_MATTE
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent Toon Principled Hair Volume Principled Light Particle Volume Image Sky Noise Wave Voronoi Brick Texture Vector Combine Vertex Separate Vector White RGB Map Separate Set Z Dilate Combine CMP_NODE_COMBYUVA
void addLink(NodeOperationOutput *from, NodeOperationInput *to)
void setResizeMode(ResizeMode resizeMode)
NodeOperation contains calculation logic.
NodeOperationInput * getInputSocket(unsigned int index)
NodeOperationOutput * getOutputSocket(unsigned int index=0)
void setResolution(unsigned int resolution[2])
set the resolution
OperationNode * node
StackEntry * from
DataType
possible data types for sockets
Definition: COM_defines.h:27
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.
@ None
The bottom left of the input image is the bottom left of the working area of the node,...
@ 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...
NodeOperation * COM_convert_data_type(const NodeOperationOutput &from, const NodeOperationInput &to)
This function will add a datetype conversion rule when the to-socket does not support the from-socket...
void COM_convert_resolution(NodeOperationBuilder &builder, NodeOperationOutput *fromSocket, NodeOperationInput *toSocket)
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.
bool COM_bnode_is_fast_node(const bNode &b_node)
True if the node is considered 'fast'.
short type