Blender  V2.93
drawnode.c
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  * The Original Code is Copyright (C) 2005 Blender Foundation.
17  * All rights reserved.
18  */
19 
25 #include "BLI_blenlib.h"
26 #include "BLI_math.h"
27 #include "BLI_system.h"
28 #include "BLI_threads.h"
29 
30 #include "DNA_node_types.h"
31 #include "DNA_object_types.h"
32 #include "DNA_screen_types.h"
33 #include "DNA_space_types.h"
34 #include "DNA_text_types.h"
35 #include "DNA_userdef_types.h"
36 
37 #include "BKE_context.h"
38 #include "BKE_curve.h"
39 #include "BKE_image.h"
40 #include "BKE_main.h"
41 #include "BKE_node.h"
42 #include "BKE_tracking.h"
43 
44 #include "BLF_api.h"
45 #include "BLT_translation.h"
46 
47 #include "BIF_glutil.h"
48 
49 #include "GPU_batch.h"
50 #include "GPU_batch_presets.h"
51 #include "GPU_framebuffer.h"
52 #include "GPU_immediate.h"
53 #include "GPU_matrix.h"
54 #include "GPU_platform.h"
55 #include "GPU_state.h"
56 
57 #include "DRW_engine.h"
58 
59 #include "RNA_access.h"
60 #include "RNA_define.h"
61 
62 #include "ED_node.h"
63 #include "ED_space_api.h"
64 
65 #include "WM_api.h"
66 #include "WM_types.h"
67 
68 #include "UI_resources.h"
69 #include "UI_view2d.h"
70 
71 #include "IMB_colormanagement.h"
72 #include "IMB_imbuf_types.h"
73 
74 #include "NOD_composite.h"
75 #include "NOD_geometry.h"
76 #include "NOD_shader.h"
77 #include "NOD_texture.h"
78 #include "node_intern.h" /* own include */
79 
80 /* Default flags for uiItemR(). Name is kept short since this is used a lot in this file. */
81 #define DEFAULT_FLAGS UI_ITEM_R_SPLIT_EMPTY_NAME
82 
83 /* ****************** SOCKET BUTTON DRAW FUNCTIONS ***************** */
84 
86  uiLayout *layout,
88  PointerRNA *UNUSED(node_ptr),
89  const char *text)
90 {
91  uiItemL(layout, text, 0);
92 }
93 
94 /* ****************** BUTTON CALLBACKS FOR ALL TREES ***************** */
95 
97 {
98  bNode *node = ptr->data;
99  /* first output stores value */
100  bNodeSocket *output = node->outputs.first;
101  PointerRNA sockptr;
103 
104  uiItemR(layout, &sockptr, "default_value", DEFAULT_FLAGS, "", ICON_NONE);
105 }
106 
108 {
109  bNode *node = ptr->data;
110  /* first output stores value */
111  bNodeSocket *output = node->outputs.first;
112  PointerRNA sockptr;
113  uiLayout *col;
115 
116  col = uiLayoutColumn(layout, false);
117  uiTemplateColorPicker(col, &sockptr, "default_value", 1, 0, 0, 0);
118  uiItemR(col, &sockptr, "default_value", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
119 }
120 
122 {
124 
125  uiLayout *col = uiLayoutColumn(layout, false);
126  uiLayout *row = uiLayoutRow(col, true);
127  uiItemR(row, ptr, "blend_type", DEFAULT_FLAGS, "", ICON_NONE);
129  uiItemR(row, ptr, "use_alpha", DEFAULT_FLAGS, "", ICON_IMAGE_RGB_ALPHA);
130  }
131 
132  uiItemR(col, ptr, "use_clamp", DEFAULT_FLAGS, NULL, ICON_NONE);
133 }
134 
136 {
137 #if 0
138  /* XXX no context access here .. */
139  bNode *node = ptr->data;
140  CurveMapping *cumap = node->storage;
141 
142  if (cumap) {
143  cumap->flag |= CUMA_DRAW_CFRA;
144  if (node->custom1 < node->custom2) {
145  cumap->sample[0] = (float)(CFRA - node->custom1) / (float)(node->custom2 - node->custom1);
146  }
147  }
148 #endif
149 
150  uiTemplateCurveMapping(layout, ptr, "curve", 's', false, false, false, false);
151 
152  uiLayout *row = uiLayoutRow(layout, true);
153  uiItemR(row, ptr, "frame_start", DEFAULT_FLAGS, IFACE_("Sta"), ICON_NONE);
154  uiItemR(row, ptr, "frame_end", DEFAULT_FLAGS, IFACE_("End"), ICON_NONE);
155 }
156 
158 {
159  uiTemplateColorRamp(layout, ptr, "color_ramp", 0);
160 }
161 
163 {
164  uiTemplateCurveMapping(layout, ptr, "mapping", 'v', false, false, false, false);
165 }
166 
167 #define SAMPLE_FLT_ISNONE FLT_MAX
168 /* bad bad, 2.5 will do better?... no it won't... */
169 static float _sample_col[4] = {SAMPLE_FLT_ISNONE};
170 void ED_node_sample_set(const float col[4])
171 {
172  if (col) {
174  }
175  else {
177  }
178 }
179 
181 {
182  bNode *node = ptr->data;
183  CurveMapping *cumap = node->storage;
184 
185  if (_sample_col[0] != SAMPLE_FLT_ISNONE) {
186  cumap->flag |= CUMA_DRAW_SAMPLE;
187  copy_v3_v3(cumap->sample, _sample_col);
188  }
189  else {
190  cumap->flag &= ~CUMA_DRAW_SAMPLE;
191  }
192 
193  /* "Tone" (Standard/Film-like) only used in the Compositor. */
196  layout, ptr, "mapping", 'c', false, false, false, (ntree->type == NTREE_COMPOSIT));
197 }
198 
200 {
201  bNode *node = ptr->data;
202  /* first output stores normal */
203  bNodeSocket *output = node->outputs.first;
204  PointerRNA sockptr;
206 
207  uiItemR(layout, &sockptr, "default_value", DEFAULT_FLAGS, "", ICON_NONE);
208 }
209 
211 {
212  bNode *node = ptr->data;
213 
214  short multi = (node->id && ((Tex *)node->id)->use_nodes && (node->type != CMP_NODE_TEXTURE) &&
215  (node->type != TEX_NODE_TEXTURE));
216 
217  uiItemR(layout, ptr, "texture", DEFAULT_FLAGS, "", ICON_NONE);
218 
219  if (multi) {
220  /* Number Drawing not optimal here, better have a list*/
221  uiItemR(layout, ptr, "node_output", DEFAULT_FLAGS, "", ICON_NONE);
222  }
223 }
224 
226 {
227  uiItemR(layout, ptr, "clamp_type", DEFAULT_FLAGS, "", ICON_NONE);
228 }
229 
231 {
232  uiItemR(layout, ptr, "interpolation_type", DEFAULT_FLAGS, "", ICON_NONE);
233  if (!ELEM(RNA_enum_get(ptr, "interpolation_type"),
236  uiItemR(layout, ptr, "clamp", DEFAULT_FLAGS, NULL, ICON_NONE);
237  }
238 }
239 
241 {
242  uiItemR(layout, ptr, "operation", DEFAULT_FLAGS, "", ICON_NONE);
243  uiItemR(layout, ptr, "use_clamp", DEFAULT_FLAGS, NULL, ICON_NONE);
244 }
245 
246 static int node_resize_area_default(bNode *node, int x, int y)
247 {
248  if (node->flag & NODE_HIDDEN) {
249  rctf totr = node->totr;
250  /* right part of node */
251  totr.xmin = node->totr.xmax - 20.0f;
252  if (BLI_rctf_isect_pt(&totr, x, y)) {
253  return NODE_RESIZE_RIGHT;
254  }
255 
256  return 0;
257  }
258 
259  const float size = NODE_RESIZE_MARGIN;
260  rctf totr = node->totr;
261  int dir = 0;
262 
263  if (x >= totr.xmax - size && x < totr.xmax && y >= totr.ymin && y < totr.ymax) {
264  dir |= NODE_RESIZE_RIGHT;
265  }
266  if (x >= totr.xmin && x < totr.xmin + size && y >= totr.ymin && y < totr.ymax) {
267  dir |= NODE_RESIZE_LEFT;
268  }
269  return dir;
270 }
271 
272 /* ****************** BUTTON CALLBACKS FOR COMMON NODES ***************** */
273 
275 {
277  layout, C, ptr, "node_tree", NULL, NULL, NULL, UI_TEMPLATE_ID_FILTER_ALL, NULL);
278 }
279 
280 /* XXX Does a bounding box update by iterating over all children.
281  * Not ideal to do this in every draw call, but doing as transform callback doesn't work,
282  * since the child node totr rects are not updated properly at that point.
283  */
285 {
286  const float margin = 1.5f * U.widget_unit;
287  NodeFrame *data = (NodeFrame *)node->storage;
288 
289  /* init rect from current frame size */
290  rctf rect;
291  node_to_view(node, node->offsetx, node->offsety, &rect.xmin, &rect.ymax);
292  node_to_view(
293  node, node->offsetx + node->width, node->offsety - node->height, &rect.xmax, &rect.ymin);
294 
295  /* frame can be resized manually only if shrinking is disabled or no children are attached */
296  data->flag |= NODE_FRAME_RESIZEABLE;
297  /* for shrinking bbox, initialize the rect from first child node */
298  bool bbinit = (data->flag & NODE_FRAME_SHRINK);
299  /* fit bounding box to all children */
300  LISTBASE_FOREACH (bNode *, tnode, &ntree->nodes) {
301  if (tnode->parent != node) {
302  continue;
303  }
304 
305  /* add margin to node rect */
306  rctf noderect = tnode->totr;
307  noderect.xmin -= margin;
308  noderect.xmax += margin;
309  noderect.ymin -= margin;
310  noderect.ymax += margin;
311 
312  /* first child initializes frame */
313  if (bbinit) {
314  bbinit = 0;
315  rect = noderect;
316  data->flag &= ~NODE_FRAME_RESIZEABLE;
317  }
318  else {
319  BLI_rctf_union(&rect, &noderect);
320  }
321  }
322 
323  /* now adjust the frame size from view-space bounding box */
324  node_from_view(node, rect.xmin, rect.ymax, &node->offsetx, &node->offsety);
325  float xmax, ymax;
326  node_from_view(node, rect.xmax, rect.ymin, &xmax, &ymax);
327  node->width = xmax - node->offsetx;
328  node->height = -ymax + node->offsety;
329 
330  node->totr = rect;
331 }
332 
333 static void node_draw_frame_label(bNodeTree *ntree, bNode *node, const float aspect)
334 {
335  /* XXX font id is crap design */
336  const int fontid = UI_style_get()->widgetlabel.uifont_id;
337  NodeFrame *data = (NodeFrame *)node->storage;
338  const int font_size = data->label_size / aspect;
339 
340  char label[MAX_NAME];
341  nodeLabel(ntree, node, label, sizeof(label));
342 
343  BLF_enable(fontid, BLF_ASPECT);
344  BLF_aspect(fontid, aspect, aspect, 1.0f);
345  /* clamp otherwise it can suck up a LOT of memory */
346  BLF_size(fontid, MIN2(24, font_size), U.dpi);
347 
348  /* title color */
349  int color_id = node_get_colorid(node);
350  uchar color[3];
351  UI_GetThemeColorBlendShade3ubv(TH_TEXT, color_id, 0.4f, 10, color);
352  BLF_color3ubv(fontid, color);
353 
354  const float margin = (float)(NODE_DY / 4);
355  const float width = BLF_width(fontid, label, sizeof(label));
356  const float ascender = BLF_ascender(fontid);
357  const int label_height = ((margin / aspect) + (ascender * aspect));
358 
359  /* 'x' doesn't need aspect correction */
360  rctf *rct = &node->totr;
361  /* XXX a bit hacky, should use separate align values for x and y */
362  float x = BLI_rctf_cent_x(rct) - (0.5f * width);
363  float y = rct->ymax - label_height;
364 
365  BLF_position(fontid, x, y, 0);
367 
368  /* draw text body */
369  if (node->id) {
370  Text *text = (Text *)node->id;
371  const int line_height_max = BLF_height_max(fontid);
372  const float line_spacing = (line_height_max * aspect);
373  const float line_width = (BLI_rctf_size_x(rct) - margin) / aspect;
374 
375  /* 'x' doesn't need aspect correction */
376  x = rct->xmin + margin;
377  y = rct->ymax - (label_height + line_spacing);
378  /* early exit */
379  int y_min = y + ((margin * 2) - (y - rct->ymin));
380 
382  BLF_clipping(fontid,
383  rct->xmin,
384  /* round to avoid clipping half-way through a line */
385  y - (floorf(((y - rct->ymin) - (margin * 2)) / line_spacing) * line_spacing),
386  rct->xmin + line_width,
387  rct->ymax);
388 
389  BLF_wordwrap(fontid, line_width);
390 
391  LISTBASE_FOREACH (TextLine *, line, &text->lines) {
392  struct ResultBLF info;
393  if (line->line[0]) {
394  BLF_position(fontid, x, y, 0);
395  BLF_draw_ex(fontid, line->line, line->len, &info);
396  y -= line_spacing * info.lines;
397  }
398  else {
399  y -= line_spacing;
400  }
401  if (y < y_min) {
402  break;
403  }
404  }
405 
407  }
408 
409  BLF_disable(fontid, BLF_ASPECT);
410 }
411 
412 static void node_draw_frame(const bContext *C,
413  ARegion *region,
414  SpaceNode *snode,
415  bNodeTree *ntree,
416  bNode *node,
418 {
419 
420  /* skip if out of view */
421  if (BLI_rctf_isect(&node->totr, &region->v2d.cur, NULL) == false) {
422  UI_block_end(C, node->block);
423  node->block = NULL;
424  return;
425  }
426 
427  float color[4];
429  const float alpha = color[3];
430 
431  /* shadow */
433 
434  /* body */
435  if (node->flag & NODE_CUSTOM_COLOR) {
436  rgba_float_args_set(color, node->color[0], node->color[1], node->color[2], alpha);
437  }
438  else {
440  }
441 
442  const rctf *rct = &node->totr;
444  UI_draw_roundbox_aa(rct, true, BASIS_RAD, color);
445 
446  /* outline active and selected emphasis */
447  if (node->flag & SELECT) {
448  if (node->flag & NODE_ACTIVE) {
450  }
451  else {
453  }
454 
455  UI_draw_roundbox_aa(rct, false, BASIS_RAD, color);
456  }
457 
458  /* label */
460 
461  UI_block_end(C, node->block);
462  UI_block_draw(C, node->block);
463  node->block = NULL;
464 }
465 
466 static int node_resize_area_frame(bNode *node, int x, int y)
467 {
468  const float size = 10.0f;
469  NodeFrame *data = (NodeFrame *)node->storage;
470  rctf totr = node->totr;
471  int dir = 0;
472 
473  /* shrinking frame size is determined by child nodes */
474  if (!(data->flag & NODE_FRAME_RESIZEABLE)) {
475  return 0;
476  }
477 
478  if (x >= totr.xmax - size && x < totr.xmax && y >= totr.ymin && y < totr.ymax) {
479  dir |= NODE_RESIZE_RIGHT;
480  }
481  if (x >= totr.xmin && x < totr.xmin + size && y >= totr.ymin && y < totr.ymax) {
482  dir |= NODE_RESIZE_LEFT;
483  }
484  if (x >= totr.xmin && x < totr.xmax && y >= totr.ymax - size && y < totr.ymax) {
485  dir |= NODE_RESIZE_TOP;
486  }
487  if (x >= totr.xmin && x < totr.xmax && y >= totr.ymin && y < totr.ymin + size) {
488  dir |= NODE_RESIZE_BOTTOM;
489  }
490 
491  return dir;
492 }
493 
495 {
496  uiItemR(layout, ptr, "label_size", DEFAULT_FLAGS, IFACE_("Label Size"), ICON_NONE);
497  uiItemR(layout, ptr, "shrink", DEFAULT_FLAGS, IFACE_("Shrink"), ICON_NONE);
498  uiItemR(layout, ptr, "text", DEFAULT_FLAGS, NULL, ICON_NONE);
499 }
500 
501 #define NODE_REROUTE_SIZE 8.0f
502 
505  bNode *node)
506 {
507  /* get "global" coords */
508  float locx, locy;
509  node_to_view(node, 0.0f, 0.0f, &locx, &locy);
510 
511  /* reroute node has exactly one input and one output, both in the same place */
512  bNodeSocket *nsock = node->outputs.first;
513  nsock->locx = locx;
514  nsock->locy = locy;
515 
516  nsock = node->inputs.first;
517  nsock->locx = locx;
518  nsock->locy = locy;
519 
520  const float size = NODE_REROUTE_SIZE;
521  node->width = size * 2;
522  node->totr.xmin = locx - size;
523  node->totr.xmax = locx + size;
524  node->totr.ymax = locy + size;
525  node->totr.ymin = locy - size;
526 }
527 
528 static void node_draw_reroute(const bContext *C,
529  ARegion *region,
530  SpaceNode *UNUSED(snode),
531  bNodeTree *ntree,
532  bNode *node,
534 {
535  char showname[128]; /* 128 used below */
536  rctf *rct = &node->totr;
537 
538  /* skip if out of view */
539  if (node->totr.xmax < region->v2d.cur.xmin || node->totr.xmin > region->v2d.cur.xmax ||
540  node->totr.ymax < region->v2d.cur.ymin || node->totr.ymin > region->v2d.cur.ymax) {
541  UI_block_end(C, node->block);
542  node->block = NULL;
543  return;
544  }
545 
546  /* XXX only kept for debugging
547  * selection state is indicated by socket outline below!
548  */
549 #if 0
550  float size = NODE_REROUTE_SIZE;
551 
552  /* body */
553  float debug_color[4];
555  UI_GetThemeColor4fv(TH_NODE, debug_color);
556  UI_draw_roundbox_aa(true, rct->xmin, rct->ymin, rct->xmax, rct->ymax, size, debug_color);
557 
558  /* outline active and selected emphasis */
559  if (node->flag & SELECT) {
561  GPU_line_smooth(true);
562  /* Using different shades of #TH_TEXT_HI for the emphasis, like triangle. */
563  if (node->flag & NODE_ACTIVE) {
564  UI_GetThemeColorShadeAlpha4fv(TH_TEXT_HI, 0, -40, debug_color);
565  }
566  else {
567  UI_GetThemeColorShadeAlpha4fv(TH_TEXT_HI, -20, -120, debug_color);
568  }
569  UI_draw_roundbox_4fv(false, rct->xmin, rct->ymin, rct->xmax, rct->ymax, size, debug_color);
570 
571  GPU_line_smooth(false);
573  }
574 #endif
575 
576  if (node->label[0] != '\0') {
577  /* draw title (node label) */
578  BLI_strncpy(showname, node->label, sizeof(showname));
579  uiDefBut(node->block,
581  0,
582  showname,
583  (int)(rct->xmin - NODE_DYS),
584  (int)(rct->ymax),
585  (short)512,
586  (short)NODE_DY,
587  NULL,
588  0,
589  0,
590  0,
591  0,
592  NULL);
593  }
594 
595  /* only draw input socket. as they all are placed on the same position.
596  * highlight also if node itself is selected, since we don't display the node body separately!
597  */
598  node_draw_sockets(&region->v2d, C, ntree, node, false, node->flag & SELECT);
599 
600  UI_block_end(C, node->block);
601  UI_block_draw(C, node->block);
602  node->block = NULL;
603 }
604 
605 /* Special tweak area for reroute node.
606  * Since this node is quite small, we use a larger tweak area for grabbing than for selection.
607  */
608 static int node_tweak_area_reroute(bNode *node, int x, int y)
609 {
610  /* square of tweak radius */
611  const float tweak_radius_sq = square_f(24.0f);
612 
613  bNodeSocket *sock = node->inputs.first;
614  float dx = sock->locx - x;
615  float dy = sock->locy - y;
616  return (dx * dx + dy * dy <= tweak_radius_sq);
617 }
618 
620 {
621  switch (ntype->type) {
622  case NODE_GROUP:
624  break;
625  case NODE_FRAME:
630  break;
631  case NODE_REROUTE:
635  break;
636  }
637 }
638 
639 /* ****************** BUTTON CALLBACKS FOR SHADER NODES ***************** */
640 
641 static void node_buts_image_user(uiLayout *layout,
642  bContext *C,
643  PointerRNA *ptr,
644  PointerRNA *imaptr,
645  PointerRNA *iuserptr,
646  const bool show_layer_selection,
647  const bool show_color_management)
648 {
649  if (!imaptr->data) {
650  return;
651  }
652 
653  uiLayout *col = uiLayoutColumn(layout, false);
654 
655  uiItemR(col, imaptr, "source", DEFAULT_FLAGS, "", ICON_NONE);
656 
657  const int source = RNA_enum_get(imaptr, "source");
658 
659  if (source == IMA_SRC_SEQUENCE) {
660  /* don't use iuser->framenr directly
661  * because it may not be updated if auto-refresh is off */
663  ImageUser *iuser = iuserptr->data;
664  /* Image *ima = imaptr->data; */ /* UNUSED */
665 
666  char numstr[32];
667  const int framenr = BKE_image_user_frame_get(iuser, CFRA, NULL);
668  BLI_snprintf(numstr, sizeof(numstr), IFACE_("Frame: %d"), framenr);
669  uiItemL(layout, numstr, ICON_NONE);
670  }
671 
672  if (ELEM(source, IMA_SRC_SEQUENCE, IMA_SRC_MOVIE)) {
673  col = uiLayoutColumn(layout, true);
674  uiItemR(col, ptr, "frame_duration", DEFAULT_FLAGS, NULL, ICON_NONE);
675  uiItemR(col, ptr, "frame_start", DEFAULT_FLAGS, NULL, ICON_NONE);
676  uiItemR(col, ptr, "frame_offset", DEFAULT_FLAGS, NULL, ICON_NONE);
677  uiItemR(col, ptr, "use_cyclic", DEFAULT_FLAGS, NULL, ICON_NONE);
678  uiItemR(col, ptr, "use_auto_refresh", DEFAULT_FLAGS, NULL, ICON_NONE);
679  }
680 
681  if (show_layer_selection && RNA_enum_get(imaptr, "type") == IMA_TYPE_MULTILAYER &&
682  RNA_boolean_get(ptr, "has_layers")) {
683  col = uiLayoutColumn(layout, false);
684  uiItemR(col, ptr, "layer", DEFAULT_FLAGS, NULL, ICON_NONE);
685  }
686 
687  if (show_color_management) {
688  uiLayout *split = uiLayoutSplit(layout, 0.5f, true);
689  PointerRNA colorspace_settings_ptr = RNA_pointer_get(imaptr, "colorspace_settings");
690  uiItemL(split, IFACE_("Color Space"), ICON_NONE);
691  uiItemR(split, &colorspace_settings_ptr, "name", DEFAULT_FLAGS, "", ICON_NONE);
692 
693  /* Avoid losing changes image is painted. */
694  if (BKE_image_is_dirty(imaptr->data)) {
695  uiLayoutSetEnabled(split, false);
696  }
697  }
698 }
699 
701 {
702  uiItemR(layout, ptr, "vector_type", DEFAULT_FLAGS, NULL, ICON_NONE);
703 }
704 
706 {
707  uiItemR(layout, ptr, "rotation_type", DEFAULT_FLAGS, NULL, ICON_NONE);
708  uiItemR(layout, ptr, "invert", DEFAULT_FLAGS, NULL, 0);
709 }
710 
712 {
713  uiItemR(layout, ptr, "operation", DEFAULT_FLAGS, "", ICON_NONE);
714 }
715 
717 {
718  uiItemR(layout, ptr, "vector_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
719  uiItemR(layout, ptr, "convert_from", DEFAULT_FLAGS, "", ICON_NONE);
720  uiItemR(layout, ptr, "convert_to", DEFAULT_FLAGS, "", ICON_NONE);
721 }
722 
724 {
725  uiItemR(layout, ptr, "attribute_type", DEFAULT_FLAGS, IFACE_("Type"), ICON_NONE);
726  uiItemR(layout, ptr, "attribute_name", DEFAULT_FLAGS, IFACE_("Name"), ICON_NONE);
727 }
728 
730 {
731  uiItemR(layout, ptr, "use_pixel_size", DEFAULT_FLAGS, NULL, 0);
732 }
733 
735 {
736  PointerRNA imaptr = RNA_pointer_get(ptr, "image");
737  PointerRNA iuserptr = RNA_pointer_get(ptr, "image_user");
738 
739  uiLayoutSetContextPointer(layout, "image_user", &iuserptr);
740  uiTemplateID(layout,
741  C,
742  ptr,
743  "image",
744  "IMAGE_OT_new",
745  "IMAGE_OT_open",
746  NULL,
748  false,
749  NULL);
750  uiItemR(layout, ptr, "interpolation", DEFAULT_FLAGS, "", ICON_NONE);
751  uiItemR(layout, ptr, "projection", DEFAULT_FLAGS, "", ICON_NONE);
752 
753  if (RNA_enum_get(ptr, "projection") == SHD_PROJ_BOX) {
754  uiItemR(layout, ptr, "projection_blend", DEFAULT_FLAGS, "Blend", ICON_NONE);
755  }
756 
757  uiItemR(layout, ptr, "extension", DEFAULT_FLAGS, "", ICON_NONE);
758 
759  /* note: image user properties used directly here, unlike compositor image node,
760  * which redefines them in the node struct RNA to get proper updates.
761  */
762  node_buts_image_user(layout, C, &iuserptr, &imaptr, &iuserptr, false, true);
763 }
764 
766 {
767  PointerRNA iuserptr = RNA_pointer_get(ptr, "image_user");
768  uiTemplateImage(layout, C, ptr, "image", &iuserptr, 0, 0);
769 }
770 
772 {
773  PointerRNA imaptr = RNA_pointer_get(ptr, "image");
774  PointerRNA iuserptr = RNA_pointer_get(ptr, "image_user");
775 
776  uiLayoutSetContextPointer(layout, "image_user", &iuserptr);
777  uiTemplateID(layout,
778  C,
779  ptr,
780  "image",
781  "IMAGE_OT_new",
782  "IMAGE_OT_open",
783  NULL,
785  false,
786  NULL);
787 
788  uiItemR(layout, ptr, "interpolation", DEFAULT_FLAGS, "", ICON_NONE);
789  uiItemR(layout, ptr, "projection", DEFAULT_FLAGS, "", ICON_NONE);
790 
791  node_buts_image_user(layout, C, &iuserptr, &imaptr, &iuserptr, false, true);
792 }
793 
795 {
796  PointerRNA iuserptr = RNA_pointer_get(ptr, "image_user");
797  uiTemplateImage(layout, C, ptr, "image", &iuserptr, 0, 0);
798 
799  uiItemR(layout, ptr, "interpolation", DEFAULT_FLAGS, IFACE_("Interpolation"), ICON_NONE);
800  uiItemR(layout, ptr, "projection", DEFAULT_FLAGS, IFACE_("Projection"), ICON_NONE);
801 }
802 
804 {
805  uiItemR(layout, ptr, "sky_type", DEFAULT_FLAGS, "", ICON_NONE);
806 
807  if (RNA_enum_get(ptr, "sky_type") == SHD_SKY_PREETHAM) {
808  uiItemR(layout, ptr, "sun_direction", DEFAULT_FLAGS, "", ICON_NONE);
809  uiItemR(layout, ptr, "turbidity", DEFAULT_FLAGS, NULL, ICON_NONE);
810  }
811  if (RNA_enum_get(ptr, "sky_type") == SHD_SKY_HOSEK) {
812  uiItemR(layout, ptr, "sun_direction", DEFAULT_FLAGS, "", ICON_NONE);
813  uiItemR(layout, ptr, "turbidity", DEFAULT_FLAGS, NULL, ICON_NONE);
814  uiItemR(layout, ptr, "ground_albedo", DEFAULT_FLAGS, NULL, ICON_NONE);
815  }
816  if (RNA_enum_get(ptr, "sky_type") == SHD_SKY_NISHITA) {
817  uiItemR(layout, ptr, "sun_disc", DEFAULT_FLAGS, NULL, 0);
818 
819  uiLayout *col;
820  if (RNA_boolean_get(ptr, "sun_disc")) {
821  col = uiLayoutColumn(layout, true);
822  uiItemR(col, ptr, "sun_size", DEFAULT_FLAGS, NULL, ICON_NONE);
823  uiItemR(col, ptr, "sun_intensity", DEFAULT_FLAGS, NULL, ICON_NONE);
824  }
825 
826  col = uiLayoutColumn(layout, true);
827  uiItemR(col, ptr, "sun_elevation", DEFAULT_FLAGS, NULL, ICON_NONE);
828  uiItemR(col, ptr, "sun_rotation", DEFAULT_FLAGS, NULL, ICON_NONE);
829 
830  uiItemR(layout, ptr, "altitude", DEFAULT_FLAGS, NULL, ICON_NONE);
831 
832  col = uiLayoutColumn(layout, true);
833  uiItemR(col, ptr, "air_density", DEFAULT_FLAGS, NULL, ICON_NONE);
834  uiItemR(col, ptr, "dust_density", DEFAULT_FLAGS, NULL, ICON_NONE);
835  uiItemR(col, ptr, "ozone_density", DEFAULT_FLAGS, NULL, ICON_NONE);
836  }
837 }
838 
840 {
841  uiItemR(layout, ptr, "gradient_type", DEFAULT_FLAGS, "", ICON_NONE);
842 }
843 
845 {
846  uiItemR(layout, ptr, "turbulence_depth", DEFAULT_FLAGS, NULL, ICON_NONE);
847 }
848 
850 {
851  uiLayout *col;
852 
853  col = uiLayoutColumn(layout, true);
854  uiItemR(col, ptr, "offset", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, IFACE_("Offset"), ICON_NONE);
855  uiItemR(col, ptr, "offset_frequency", DEFAULT_FLAGS, IFACE_("Frequency"), ICON_NONE);
856 
857  col = uiLayoutColumn(layout, true);
858  uiItemR(col, ptr, "squash", DEFAULT_FLAGS, IFACE_("Squash"), ICON_NONE);
859  uiItemR(col, ptr, "squash_frequency", DEFAULT_FLAGS, IFACE_("Frequency"), ICON_NONE);
860 }
861 
863 {
864  uiItemR(layout, ptr, "wave_type", DEFAULT_FLAGS, "", ICON_NONE);
865  int type = RNA_enum_get(ptr, "wave_type");
866  if (type == SHD_WAVE_BANDS) {
867  uiItemR(layout, ptr, "bands_direction", DEFAULT_FLAGS, "", ICON_NONE);
868  }
869  else { /* SHD_WAVE_RINGS */
870  uiItemR(layout, ptr, "rings_direction", DEFAULT_FLAGS, "", ICON_NONE);
871  }
872 
873  uiItemR(layout, ptr, "wave_profile", DEFAULT_FLAGS, "", ICON_NONE);
874 }
875 
877 {
878  uiItemR(layout, ptr, "musgrave_dimensions", DEFAULT_FLAGS, "", ICON_NONE);
879  uiItemR(layout, ptr, "musgrave_type", DEFAULT_FLAGS, "", ICON_NONE);
880 }
881 
883 {
884  uiItemR(layout, ptr, "voronoi_dimensions", DEFAULT_FLAGS, "", ICON_NONE);
885  uiItemR(layout, ptr, "feature", DEFAULT_FLAGS, "", ICON_NONE);
886  int feature = RNA_enum_get(ptr, "feature");
888  RNA_enum_get(ptr, "voronoi_dimensions") != 1) {
889  uiItemR(layout, ptr, "distance", DEFAULT_FLAGS, "", ICON_NONE);
890  }
891 }
892 
894 {
895  uiItemR(layout, ptr, "noise_dimensions", DEFAULT_FLAGS, "", ICON_NONE);
896 }
897 
899  bContext *UNUSED(C),
900  PointerRNA *ptr)
901 {
902  bNode *node = ptr->data;
903  NodeShaderTexPointDensity *shader_point_density = node->storage;
904  Object *ob = (Object *)node->id;
905 
906  PointerRNA ob_ptr, obdata_ptr;
907  RNA_id_pointer_create((ID *)ob, &ob_ptr);
908  RNA_id_pointer_create(ob ? (ID *)ob->data : NULL, &obdata_ptr);
909 
910  uiItemR(layout, ptr, "point_source", UI_ITEM_R_EXPAND, NULL, ICON_NONE);
911  uiItemR(layout, ptr, "object", DEFAULT_FLAGS, NULL, ICON_NONE);
912 
913  if (node->id && shader_point_density->point_source == SHD_POINTDENSITY_SOURCE_PSYS) {
914  PointerRNA dataptr;
915  RNA_id_pointer_create((ID *)node->id, &dataptr);
916  uiItemPointerR(layout, ptr, "particle_system", &dataptr, "particle_systems", NULL, ICON_NONE);
917  }
918 
919  uiItemR(layout, ptr, "space", DEFAULT_FLAGS, NULL, ICON_NONE);
920  uiItemR(layout, ptr, "radius", DEFAULT_FLAGS, NULL, ICON_NONE);
921  uiItemR(layout, ptr, "interpolation", DEFAULT_FLAGS, NULL, ICON_NONE);
922  uiItemR(layout, ptr, "resolution", DEFAULT_FLAGS, NULL, ICON_NONE);
923  if (shader_point_density->point_source == SHD_POINTDENSITY_SOURCE_PSYS) {
924  uiItemR(layout, ptr, "particle_color_source", DEFAULT_FLAGS, NULL, ICON_NONE);
925  }
926  else {
927  uiItemR(layout, ptr, "vertex_color_source", DEFAULT_FLAGS, NULL, ICON_NONE);
928  if (shader_point_density->ob_color_source == SHD_POINTDENSITY_COLOR_VERTWEIGHT) {
929  if (ob_ptr.data) {
931  layout, ptr, "vertex_attribute_name", &ob_ptr, "vertex_groups", "", ICON_NONE);
932  }
933  }
934  if (shader_point_density->ob_color_source == SHD_POINTDENSITY_COLOR_VERTCOL) {
935  if (obdata_ptr.data) {
937  layout, ptr, "vertex_attribute_name", &obdata_ptr, "vertex_colors", "", ICON_NONE);
938  }
939  }
940  }
941 }
942 
944 {
945  uiItemR(layout, ptr, "object", DEFAULT_FLAGS, NULL, 0);
946  uiItemR(layout, ptr, "from_instancer", DEFAULT_FLAGS, NULL, 0);
947 }
948 
950 {
951  uiItemR(layout, ptr, "invert", DEFAULT_FLAGS, NULL, 0);
952 }
953 
955 {
956  uiItemR(layout, ptr, "from_instancer", DEFAULT_FLAGS, NULL, 0);
957 
958  if (!RNA_boolean_get(ptr, "from_instancer")) {
959  PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
960 
961  if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {
962  PointerRNA dataptr = RNA_pointer_get(&obptr, "data");
963  uiItemPointerR(layout, ptr, "uv_map", &dataptr, "uv_layers", "", ICON_NONE);
964  }
965  }
966 }
967 
969 {
970  PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
971  if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {
972  PointerRNA dataptr = RNA_pointer_get(&obptr, "data");
973 
974  if (U.experimental.use_sculpt_vertex_colors &&
975  RNA_collection_length(&dataptr, "sculpt_vertex_colors")) {
977  layout, ptr, "layer_name", &dataptr, "sculpt_vertex_colors", "", ICON_GROUP_VCOL);
978  }
979  else {
980  uiItemPointerR(layout, ptr, "layer_name", &dataptr, "vertex_colors", "", ICON_GROUP_VCOL);
981  }
982  }
983  else {
984  uiItemL(layout, "No mesh in active object.", ICON_ERROR);
985  }
986 }
987 
989 {
990  uiItemR(layout, ptr, "use_tips", DEFAULT_FLAGS, NULL, 0);
991 }
992 
994 {
995  uiItemR(layout, ptr, "space", DEFAULT_FLAGS, "", 0);
996 
997  if (RNA_enum_get(ptr, "space") == SHD_SPACE_TANGENT) {
998  PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
999 
1000  if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {
1001  PointerRNA dataptr = RNA_pointer_get(&obptr, "data");
1002  uiItemPointerR(layout, ptr, "uv_map", &dataptr, "uv_layers", "", ICON_NONE);
1003  }
1004  else {
1005  uiItemR(layout, ptr, "uv_map", DEFAULT_FLAGS, "", 0);
1006  }
1007  }
1008 }
1009 
1011 {
1012  uiItemR(layout, ptr, "space", DEFAULT_FLAGS, "", 0);
1013 }
1014 
1016 {
1017  uiLayout *split, *row;
1018 
1019  split = uiLayoutSplit(layout, 0.0f, false);
1020 
1021  uiItemR(split, ptr, "direction_type", DEFAULT_FLAGS, "", 0);
1022 
1023  row = uiLayoutRow(split, false);
1024 
1025  if (RNA_enum_get(ptr, "direction_type") == SHD_TANGENT_UVMAP) {
1026  PointerRNA obptr = CTX_data_pointer_get(C, "active_object");
1027 
1028  if (obptr.data && RNA_enum_get(&obptr, "type") == OB_MESH) {
1029  PointerRNA dataptr = RNA_pointer_get(&obptr, "data");
1030  uiItemPointerR(row, ptr, "uv_map", &dataptr, "uv_layers", "", ICON_NONE);
1031  }
1032  else {
1033  uiItemR(row, ptr, "uv_map", DEFAULT_FLAGS, "", 0);
1034  }
1035  }
1036  else {
1037  uiItemR(row, ptr, "axis", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, 0);
1038  }
1039 }
1040 
1042 {
1043  uiItemR(layout, ptr, "distribution", DEFAULT_FLAGS, "", ICON_NONE);
1044 }
1045 
1047 {
1048  uiItemR(layout, ptr, "distribution", DEFAULT_FLAGS, "", ICON_NONE);
1049  uiItemR(layout, ptr, "subsurface_method", DEFAULT_FLAGS, "", ICON_NONE);
1050 }
1051 
1053 {
1054  uiItemR(layout, ptr, "distribution", DEFAULT_FLAGS, "", ICON_NONE);
1055 }
1056 
1058 {
1059  uiItemR(layout, ptr, "falloff", DEFAULT_FLAGS, "", ICON_NONE);
1060 }
1061 
1063 {
1064  uiItemR(layout, ptr, "component", DEFAULT_FLAGS, "", ICON_NONE);
1065 }
1066 
1068 {
1069  uiItemR(layout, ptr, "component", DEFAULT_FLAGS, "", ICON_NONE);
1070 }
1071 
1073  bContext *UNUSED(C),
1074  PointerRNA *ptr)
1075 {
1076  uiItemR(layout, ptr, "parametrization", DEFAULT_FLAGS, "", ICON_NONE);
1077 }
1078 
1080 {
1081  uiLayout *row;
1082 
1083  row = uiLayoutRow(layout, false);
1084  uiItemR(row, ptr, "mode", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1085 
1086  row = uiLayoutRow(layout, true);
1087 
1088  if (RNA_enum_get(ptr, "mode") == NODE_IES_INTERNAL) {
1089  uiItemR(row, ptr, "ies", DEFAULT_FLAGS, "", ICON_NONE);
1090  }
1091  else {
1092  uiItemR(row, ptr, "filepath", DEFAULT_FLAGS, "", ICON_NONE);
1093  }
1094 }
1095 
1097 {
1098  uiLayout *row;
1099 
1100  row = uiLayoutRow(layout, false);
1101  uiItemR(row, ptr, "mode", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1102 
1103  row = uiLayoutRow(layout, true);
1104 
1105  if (RNA_enum_get(ptr, "mode") == NODE_SCRIPT_INTERNAL) {
1106  uiItemR(row, ptr, "script", DEFAULT_FLAGS, "", ICON_NONE);
1107  }
1108  else {
1109  uiItemR(row, ptr, "filepath", DEFAULT_FLAGS, "", ICON_NONE);
1110  }
1111 
1112  uiItemO(row, "", ICON_FILE_REFRESH, "node.shader_script_update");
1113 }
1114 
1116 {
1117  uiItemS(layout);
1118 
1119  node_shader_buts_script(layout, C, ptr);
1120 
1121 #if 0 /* not implemented yet */
1122  if (RNA_enum_get(ptr, "mode") == NODE_SCRIPT_EXTERNAL) {
1123  uiItemR(layout, ptr, "use_auto_update", DEFAULT_FLAGS, NULL, ICON_NONE);
1124  }
1125 #endif
1126 }
1127 
1129 {
1130  uiItemR(layout, ptr, "target", DEFAULT_FLAGS, "", ICON_NONE);
1131 }
1132 
1134 {
1135  uiLayout *row, *col;
1136 
1137  col = uiLayoutColumn(layout, false);
1138  row = uiLayoutRow(col, true);
1139  uiItemR(row, ptr, "blend_type", DEFAULT_FLAGS, "", ICON_NONE);
1140  uiItemR(col, ptr, "use_clamp", DEFAULT_FLAGS, NULL, ICON_NONE);
1141 }
1142 
1144 {
1145  uiItemR(layout, ptr, "samples", DEFAULT_FLAGS, NULL, ICON_NONE);
1146 }
1147 
1149  bContext *UNUSED(C),
1150  PointerRNA *ptr)
1151 {
1152  uiItemR(layout, ptr, "samples", DEFAULT_FLAGS, NULL, ICON_NONE);
1153  uiItemR(layout, ptr, "inside", DEFAULT_FLAGS, NULL, ICON_NONE);
1154  uiItemR(layout, ptr, "only_local", DEFAULT_FLAGS, NULL, ICON_NONE);
1155 }
1156 
1158 {
1159  uiItemR(layout, ptr, "noise_dimensions", DEFAULT_FLAGS, "", ICON_NONE);
1160 }
1161 
1163 {
1164  uiItemR(layout, ptr, "name", DEFAULT_FLAGS, NULL, ICON_NONE);
1165 }
1166 
1167 /* only once called */
1169 {
1170  switch (ntype->type) {
1171  case SH_NODE_NORMAL:
1172  ntype->draw_buttons = node_buts_normal;
1173  break;
1174  case SH_NODE_CURVE_VEC:
1176  break;
1177  case SH_NODE_CURVE_RGB:
1179  break;
1180  case SH_NODE_MAPPING:
1182  break;
1183  case SH_NODE_VALUE:
1184  ntype->draw_buttons = node_buts_value;
1185  break;
1186  case SH_NODE_RGB:
1187  ntype->draw_buttons = node_buts_rgb;
1188  break;
1189  case SH_NODE_MIX_RGB:
1191  break;
1192  case SH_NODE_VALTORGB:
1194  break;
1195  case SH_NODE_CLAMP:
1197  break;
1198  case SH_NODE_MAP_RANGE:
1200  break;
1201  case SH_NODE_MATH:
1202  ntype->draw_buttons = node_buts_math;
1203  break;
1204  case SH_NODE_VECTOR_MATH:
1206  break;
1207  case SH_NODE_VECTOR_ROTATE:
1209  break;
1212  break;
1213  case SH_NODE_ATTRIBUTE:
1215  break;
1216  case SH_NODE_WIREFRAME:
1218  break;
1219  case SH_NODE_TEX_SKY:
1221  break;
1222  case SH_NODE_TEX_IMAGE:
1225  break;
1229  break;
1230  case SH_NODE_TEX_GRADIENT:
1232  break;
1233  case SH_NODE_TEX_MAGIC:
1235  break;
1236  case SH_NODE_TEX_BRICK:
1238  break;
1239  case SH_NODE_TEX_WAVE:
1241  break;
1242  case SH_NODE_TEX_MUSGRAVE:
1244  break;
1245  case SH_NODE_TEX_VORONOI:
1247  break;
1248  case SH_NODE_TEX_NOISE:
1250  break;
1253  break;
1254  case SH_NODE_TEX_COORD:
1256  break;
1257  case SH_NODE_BUMP:
1259  break;
1260  case SH_NODE_NORMAL_MAP:
1262  break;
1263  case SH_NODE_DISPLACEMENT:
1266  break;
1267  case SH_NODE_TANGENT:
1269  break;
1270  case SH_NODE_BSDF_GLOSSY:
1271  case SH_NODE_BSDF_GLASS:
1274  break;
1277  break;
1280  break;
1283  break;
1284  case SH_NODE_BSDF_TOON:
1286  break;
1287  case SH_NODE_BSDF_HAIR:
1289  break;
1292  break;
1293  case SH_NODE_SCRIPT:
1296  break;
1297  case SH_NODE_UVMAP:
1299  break;
1300  case SH_NODE_VERTEX_COLOR:
1302  break;
1303  case SH_NODE_UVALONGSTROKE:
1305  break;
1307  case SH_NODE_OUTPUT_LIGHT:
1308  case SH_NODE_OUTPUT_WORLD:
1310  break;
1313  break;
1314  case SH_NODE_TEX_IES:
1316  break;
1317  case SH_NODE_BEVEL:
1319  break;
1322  break;
1325  break;
1326  case SH_NODE_OUTPUT_AOV:
1328  break;
1329  }
1330 }
1331 
1332 /* ****************** BUTTON CALLBACKS FOR COMPOSITE NODES ***************** */
1333 
1334 static void node_buts_image_views(uiLayout *layout,
1335  bContext *UNUSED(C),
1336  PointerRNA *ptr,
1337  PointerRNA *imaptr)
1338 {
1339  uiLayout *col;
1340 
1341  if (!imaptr->data) {
1342  return;
1343  }
1344 
1345  col = uiLayoutColumn(layout, false);
1346 
1347  if (RNA_boolean_get(ptr, "has_views")) {
1348  if (RNA_enum_get(ptr, "view") == 0) {
1349  uiItemR(col, ptr, "view", DEFAULT_FLAGS, NULL, ICON_CAMERA_STEREO);
1350  }
1351  else {
1352  uiItemR(col, ptr, "view", DEFAULT_FLAGS, NULL, ICON_SCENE);
1353  }
1354  }
1355 }
1356 
1358 {
1359  bNode *node = ptr->data;
1360 
1361  PointerRNA iuserptr;
1362  RNA_pointer_create(ptr->owner_id, &RNA_ImageUser, node->storage, &iuserptr);
1363  uiLayoutSetContextPointer(layout, "image_user", &iuserptr);
1364  uiTemplateID(layout,
1365  C,
1366  ptr,
1367  "image",
1368  "IMAGE_OT_new",
1369  "IMAGE_OT_open",
1370  NULL,
1372  false,
1373  NULL);
1374  if (!node->id) {
1375  return;
1376  }
1377 
1378  PointerRNA imaptr = RNA_pointer_get(ptr, "image");
1379 
1380  node_buts_image_user(layout, C, ptr, &imaptr, &iuserptr, true, true);
1381 
1382  node_buts_image_views(layout, C, ptr, &imaptr);
1383 }
1384 
1386 {
1387  bNode *node = ptr->data;
1388 
1389  PointerRNA iuserptr;
1390  RNA_pointer_create(ptr->owner_id, &RNA_ImageUser, node->storage, &iuserptr);
1391  uiLayoutSetContextPointer(layout, "image_user", &iuserptr);
1392  uiTemplateImage(layout, C, ptr, "image", &iuserptr, 0, 1);
1393 }
1394 
1396 {
1397  bNode *node = ptr->data;
1398  uiLayout *col, *row;
1399 
1400  uiTemplateID(layout, C, ptr, "scene", NULL, NULL, NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
1401 
1402  if (!node->id) {
1403  return;
1404  }
1405 
1406  col = uiLayoutColumn(layout, false);
1407  row = uiLayoutRow(col, true);
1408  uiItemR(row, ptr, "layer", DEFAULT_FLAGS, "", ICON_NONE);
1409 
1410  PropertyRNA *prop = RNA_struct_find_property(ptr, "layer");
1411  const char *layer_name;
1413  C, ptr, prop, RNA_property_enum_get(ptr, prop), &layer_name))) {
1414  return;
1415  }
1416 
1417  PointerRNA scn_ptr;
1418  char scene_name[MAX_ID_NAME - 2];
1419  scn_ptr = RNA_pointer_get(ptr, "scene");
1420  RNA_string_get(&scn_ptr, "name", scene_name);
1421 
1422  PointerRNA op_ptr;
1423  uiItemFullO(
1424  row, "RENDER_OT_render", "", ICON_RENDER_STILL, NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr);
1425  RNA_string_set(&op_ptr, "layer", layer_name);
1426  RNA_string_set(&op_ptr, "scene", scene_name);
1427 }
1428 
1430 {
1431  uiLayout *col, *row;
1432 
1433  col = uiLayoutColumn(layout, false);
1434  const int filter = RNA_enum_get(ptr, "filter_type");
1435  const int reference = RNA_boolean_get(ptr, "use_variable_size");
1436 
1437  uiItemR(col, ptr, "filter_type", DEFAULT_FLAGS, "", ICON_NONE);
1438  if (filter != R_FILTER_FAST_GAUSS) {
1439  uiItemR(col, ptr, "use_variable_size", DEFAULT_FLAGS, NULL, ICON_NONE);
1440  if (!reference) {
1441  uiItemR(col, ptr, "use_bokeh", DEFAULT_FLAGS, NULL, ICON_NONE);
1442  }
1443  uiItemR(col, ptr, "use_gamma_correction", DEFAULT_FLAGS, NULL, ICON_NONE);
1444  }
1445 
1446  uiItemR(col, ptr, "use_relative", DEFAULT_FLAGS, NULL, ICON_NONE);
1447 
1448  if (RNA_boolean_get(ptr, "use_relative")) {
1449  uiItemL(col, IFACE_("Aspect Correction"), ICON_NONE);
1450  row = uiLayoutRow(layout, true);
1451  uiItemR(row, ptr, "aspect_correction", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1452 
1453  col = uiLayoutColumn(layout, true);
1454  uiItemR(col, ptr, "factor_x", DEFAULT_FLAGS, IFACE_("X"), ICON_NONE);
1455  uiItemR(col, ptr, "factor_y", DEFAULT_FLAGS, IFACE_("Y"), ICON_NONE);
1456  }
1457  else {
1458  col = uiLayoutColumn(layout, true);
1459  uiItemR(col, ptr, "size_x", DEFAULT_FLAGS, IFACE_("X"), ICON_NONE);
1460  uiItemR(col, ptr, "size_y", DEFAULT_FLAGS, IFACE_("Y"), ICON_NONE);
1461  }
1462  uiItemR(col, ptr, "use_extended_bounds", DEFAULT_FLAGS, NULL, ICON_NONE);
1463 }
1464 
1466 {
1467  uiLayout *col;
1468 
1469  uiItemR(layout, ptr, "iterations", DEFAULT_FLAGS, NULL, ICON_NONE);
1470  uiItemR(layout, ptr, "use_wrap", DEFAULT_FLAGS, NULL, ICON_NONE);
1471 
1472  col = uiLayoutColumn(layout, true);
1473  uiItemL(col, IFACE_("Center:"), ICON_NONE);
1474  uiItemR(col, ptr, "center_x", DEFAULT_FLAGS, IFACE_("X"), ICON_NONE);
1475  uiItemR(col, ptr, "center_y", DEFAULT_FLAGS, IFACE_("Y"), ICON_NONE);
1476 
1477  uiItemS(layout);
1478 
1479  col = uiLayoutColumn(layout, true);
1480  uiItemR(col, ptr, "distance", DEFAULT_FLAGS, NULL, ICON_NONE);
1481  uiItemR(col, ptr, "angle", DEFAULT_FLAGS, NULL, ICON_NONE);
1482 
1483  uiItemS(layout);
1484 
1485  uiItemR(layout, ptr, "spin", DEFAULT_FLAGS, NULL, ICON_NONE);
1486  uiItemR(layout, ptr, "zoom", DEFAULT_FLAGS, NULL, ICON_NONE);
1487 }
1488 
1490  bContext *UNUSED(C),
1491  PointerRNA *ptr)
1492 {
1493  uiLayout *col;
1494 
1495  col = uiLayoutColumn(layout, true);
1496  uiItemR(col, ptr, "iterations", DEFAULT_FLAGS, NULL, ICON_NONE);
1497  uiItemR(col, ptr, "sigma_color", DEFAULT_FLAGS, NULL, ICON_NONE);
1498  uiItemR(col, ptr, "sigma_space", DEFAULT_FLAGS, NULL, ICON_NONE);
1499 }
1500 
1502 {
1503  uiLayout *sub, *col;
1504 
1505  col = uiLayoutColumn(layout, false);
1506  uiItemL(col, IFACE_("Bokeh Type:"), ICON_NONE);
1507  uiItemR(col, ptr, "bokeh", DEFAULT_FLAGS, "", ICON_NONE);
1508  uiItemR(col, ptr, "angle", DEFAULT_FLAGS, NULL, ICON_NONE);
1509 
1510  uiItemR(layout, ptr, "use_gamma_correction", DEFAULT_FLAGS, NULL, ICON_NONE);
1511 
1512  col = uiLayoutColumn(layout, false);
1513  uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_zbuffer") == true);
1514  uiItemR(col, ptr, "f_stop", DEFAULT_FLAGS, NULL, ICON_NONE);
1515 
1516  uiItemR(layout, ptr, "blur_max", DEFAULT_FLAGS, NULL, ICON_NONE);
1517  uiItemR(layout, ptr, "threshold", DEFAULT_FLAGS, NULL, ICON_NONE);
1518 
1519  col = uiLayoutColumn(layout, false);
1520  uiItemR(col, ptr, "use_preview", DEFAULT_FLAGS, NULL, ICON_NONE);
1521 
1522  uiTemplateID(layout, C, ptr, "scene", NULL, NULL, NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
1523 
1524  col = uiLayoutColumn(layout, false);
1525  uiItemR(col, ptr, "use_zbuffer", DEFAULT_FLAGS, NULL, ICON_NONE);
1526  sub = uiLayoutColumn(col, false);
1527  uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_zbuffer") == false);
1528  uiItemR(sub, ptr, "z_scale", DEFAULT_FLAGS, NULL, ICON_NONE);
1529 }
1530 
1532 {
1533  uiLayout *col;
1534 
1535  col = uiLayoutColumn(layout, false);
1536 
1537  uiItemR(col, ptr, "threshold", 0, NULL, ICON_NONE);
1538  uiItemR(col, ptr, "contrast_limit", 0, NULL, ICON_NONE);
1539  uiItemR(col, ptr, "corner_rounding", 0, NULL, ICON_NONE);
1540 }
1541 
1542 /* qdn: glare node */
1544 {
1545  uiItemR(layout, ptr, "glare_type", DEFAULT_FLAGS, "", ICON_NONE);
1546  uiItemR(layout, ptr, "quality", DEFAULT_FLAGS, "", ICON_NONE);
1547 
1548  if (RNA_enum_get(ptr, "glare_type") != 1) {
1549  uiItemR(layout, ptr, "iterations", DEFAULT_FLAGS, NULL, ICON_NONE);
1550 
1551  if (RNA_enum_get(ptr, "glare_type") != 0) {
1552  uiItemR(layout, ptr, "color_modulation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1553  }
1554  }
1555 
1556  uiItemR(layout, ptr, "mix", DEFAULT_FLAGS, NULL, ICON_NONE);
1557  uiItemR(layout, ptr, "threshold", DEFAULT_FLAGS, NULL, ICON_NONE);
1558 
1559  if (RNA_enum_get(ptr, "glare_type") == 2) {
1560  uiItemR(layout, ptr, "streaks", DEFAULT_FLAGS, NULL, ICON_NONE);
1561  uiItemR(layout, ptr, "angle_offset", DEFAULT_FLAGS, NULL, ICON_NONE);
1562  }
1563  if (RNA_enum_get(ptr, "glare_type") == 0 || RNA_enum_get(ptr, "glare_type") == 2) {
1564  uiItemR(layout, ptr, "fade", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1565 
1566  if (RNA_enum_get(ptr, "glare_type") == 0) {
1567  uiItemR(layout, ptr, "use_rotate_45", DEFAULT_FLAGS, NULL, ICON_NONE);
1568  }
1569  }
1570  if (RNA_enum_get(ptr, "glare_type") == 1) {
1571  uiItemR(layout, ptr, "size", DEFAULT_FLAGS, NULL, ICON_NONE);
1572  }
1573 }
1574 
1576 {
1577  uiLayout *col;
1578 
1579  col = uiLayoutColumn(layout, false);
1580  uiItemR(col, ptr, "tonemap_type", DEFAULT_FLAGS, "", ICON_NONE);
1581  if (RNA_enum_get(ptr, "tonemap_type") == 0) {
1582  uiItemR(col, ptr, "key", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1583  uiItemR(col, ptr, "offset", DEFAULT_FLAGS, NULL, ICON_NONE);
1584  uiItemR(col, ptr, "gamma", DEFAULT_FLAGS, NULL, ICON_NONE);
1585  }
1586  else {
1587  uiItemR(col, ptr, "intensity", DEFAULT_FLAGS, NULL, ICON_NONE);
1588  uiItemR(col, ptr, "contrast", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1589  uiItemR(col, ptr, "adaptation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1590  uiItemR(col, ptr, "correction", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1591  }
1592 }
1593 
1595 {
1596  uiLayout *col;
1597 
1598  col = uiLayoutColumn(layout, false);
1599  uiItemR(col, ptr, "use_projector", DEFAULT_FLAGS, NULL, ICON_NONE);
1600 
1601  col = uiLayoutColumn(col, false);
1602  uiLayoutSetActive(col, RNA_boolean_get(ptr, "use_projector") == false);
1603  uiItemR(col, ptr, "use_jitter", DEFAULT_FLAGS, NULL, ICON_NONE);
1604  uiItemR(col, ptr, "use_fit", DEFAULT_FLAGS, NULL, ICON_NONE);
1605 }
1606 
1608 {
1609  uiLayout *col;
1610 
1611  col = uiLayoutColumn(layout, false);
1612  uiItemR(col, ptr, "samples", DEFAULT_FLAGS, NULL, ICON_NONE);
1613  uiItemR(col, ptr, "factor", DEFAULT_FLAGS, IFACE_("Blur"), ICON_NONE);
1614 
1615  col = uiLayoutColumn(layout, true);
1616  uiItemL(col, IFACE_("Speed:"), ICON_NONE);
1617  uiItemR(col, ptr, "speed_min", DEFAULT_FLAGS, IFACE_("Min"), ICON_NONE);
1618  uiItemR(col, ptr, "speed_max", DEFAULT_FLAGS, IFACE_("Max"), ICON_NONE);
1619 
1620  uiItemR(layout, ptr, "use_curved", DEFAULT_FLAGS, NULL, ICON_NONE);
1621 }
1622 
1624 {
1625  uiItemR(layout, ptr, "filter_type", DEFAULT_FLAGS, "", ICON_NONE);
1626 }
1627 
1629 {
1630  uiItemR(layout, ptr, "axis", DEFAULT_FLAGS, "", ICON_NONE);
1631 }
1632 
1634 {
1635  uiLayout *col;
1636 
1637  uiItemR(layout, ptr, "use_crop_size", DEFAULT_FLAGS, NULL, ICON_NONE);
1638  uiItemR(layout, ptr, "relative", DEFAULT_FLAGS, NULL, ICON_NONE);
1639 
1640  col = uiLayoutColumn(layout, true);
1641  if (RNA_boolean_get(ptr, "relative")) {
1642  uiItemR(col, ptr, "rel_min_x", DEFAULT_FLAGS, IFACE_("Left"), ICON_NONE);
1643  uiItemR(col, ptr, "rel_max_x", DEFAULT_FLAGS, IFACE_("Right"), ICON_NONE);
1644  uiItemR(col, ptr, "rel_min_y", DEFAULT_FLAGS, IFACE_("Up"), ICON_NONE);
1645  uiItemR(col, ptr, "rel_max_y", DEFAULT_FLAGS, IFACE_("Down"), ICON_NONE);
1646  }
1647  else {
1648  uiItemR(col, ptr, "min_x", DEFAULT_FLAGS, IFACE_("Left"), ICON_NONE);
1649  uiItemR(col, ptr, "max_x", DEFAULT_FLAGS, IFACE_("Right"), ICON_NONE);
1650  uiItemR(col, ptr, "min_y", DEFAULT_FLAGS, IFACE_("Up"), ICON_NONE);
1651  uiItemR(col, ptr, "max_y", DEFAULT_FLAGS, IFACE_("Down"), ICON_NONE);
1652  }
1653 }
1654 
1656 {
1657  uiLayout *row, *col;
1658 
1659  col = uiLayoutColumn(layout, false);
1660  row = uiLayoutRow(col, false);
1661  uiItemR(row, ptr, "axis", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1662  uiItemR(col, ptr, "factor", DEFAULT_FLAGS, NULL, ICON_NONE);
1663 }
1664 
1666  bContext *UNUSED(C),
1667  PointerRNA *ptr)
1668 {
1669  uiLayout *col;
1670 
1671  col = uiLayoutColumn(layout, false);
1672 
1673  uiItemL(col, IFACE_("Inner Edge:"), ICON_NONE);
1674  uiItemR(col, ptr, "inner_mode", DEFAULT_FLAGS, "", ICON_NONE);
1675  uiItemL(col, IFACE_("Buffer Edge:"), ICON_NONE);
1676  uiItemR(col, ptr, "edge_mode", DEFAULT_FLAGS, "", ICON_NONE);
1677 }
1678 
1680 {
1681  uiLayout *col;
1682 
1683  col = uiLayoutColumn(layout, true);
1684  uiItemR(col, ptr, "use_clamp", DEFAULT_FLAGS, NULL, ICON_NONE);
1685 }
1686 
1688 {
1689  uiLayout *sub, *col;
1690 
1691  col = uiLayoutColumn(layout, true);
1692  uiItemR(col, ptr, "offset", DEFAULT_FLAGS, NULL, ICON_NONE);
1693  uiItemR(col, ptr, "size", DEFAULT_FLAGS, NULL, ICON_NONE);
1694 
1695  col = uiLayoutColumn(layout, true);
1696  uiItemR(col, ptr, "use_min", DEFAULT_FLAGS, NULL, ICON_NONE);
1697  sub = uiLayoutColumn(col, false);
1698  uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_min"));
1699  uiItemR(sub, ptr, "min", DEFAULT_FLAGS, "", ICON_NONE);
1700 
1701  col = uiLayoutColumn(layout, true);
1702  uiItemR(col, ptr, "use_max", DEFAULT_FLAGS, NULL, ICON_NONE);
1703  sub = uiLayoutColumn(col, false);
1704  uiLayoutSetActive(sub, RNA_boolean_get(ptr, "use_max"));
1705  uiItemR(sub, ptr, "max", DEFAULT_FLAGS, "", ICON_NONE);
1706 }
1707 
1709 {
1710  uiLayout *col;
1711 
1712  col = uiLayoutColumn(layout, true);
1713  uiItemR(col, ptr, "use_premultiply", DEFAULT_FLAGS, NULL, ICON_NONE);
1714  uiItemR(col, ptr, "premul", DEFAULT_FLAGS, NULL, ICON_NONE);
1715 }
1716 
1718 {
1719  uiLayout *col;
1720 
1721  col = uiLayoutColumn(layout, true);
1722  uiItemR(col, ptr, "use_alpha", DEFAULT_FLAGS, NULL, ICON_NONE);
1723  uiItemR(col, ptr, "use_antialias_z", DEFAULT_FLAGS, NULL, ICON_NONE);
1724 }
1725 
1727 {
1728  uiItemR(layout, ptr, "mode", DEFAULT_FLAGS, NULL, ICON_NONE);
1729  uiItemR(layout, ptr, "distance", DEFAULT_FLAGS, NULL, ICON_NONE);
1730  switch (RNA_enum_get(ptr, "mode")) {
1732  uiItemR(layout, ptr, "edge", DEFAULT_FLAGS, NULL, ICON_NONE);
1733  break;
1735  uiItemR(layout, ptr, "falloff", DEFAULT_FLAGS, NULL, ICON_NONE);
1736  break;
1737  }
1738 }
1739 
1741 {
1742  uiItemR(layout, ptr, "distance", DEFAULT_FLAGS, NULL, ICON_NONE);
1743 }
1744 
1746 {
1747  uiLayout *col;
1748 
1749  col = uiLayoutColumn(layout, false);
1750  uiItemR(col, ptr, "threshold", DEFAULT_FLAGS, NULL, ICON_NONE);
1751  uiItemR(col, ptr, "threshold_neighbor", DEFAULT_FLAGS, NULL, ICON_NONE);
1752 }
1753 
1755 {
1756  uiLayout *col;
1757 
1758  col = uiLayoutColumn(layout, true);
1759  uiItemR(col, ptr, "tolerance", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1760  uiItemR(col, ptr, "falloff", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1761 }
1762 
1764  bContext *UNUSED(C),
1765  PointerRNA *ptr)
1766 {
1767  uiLayout *col, *row;
1768 
1769  col = uiLayoutColumn(layout, true);
1770 
1771  uiItemL(layout, IFACE_("Color Space:"), ICON_NONE);
1772  row = uiLayoutRow(layout, false);
1773  uiItemR(row, ptr, "channel", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1774 
1775  uiItemR(col, ptr, "tolerance", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1776  uiItemR(col, ptr, "falloff", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1777 }
1778 
1780 {
1781  uiLayout *row, *col;
1782 
1783  uiItemL(layout, IFACE_("Despill Channel:"), ICON_NONE);
1784  row = uiLayoutRow(layout, false);
1785  uiItemR(row, ptr, "channel", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1786 
1787  col = uiLayoutColumn(layout, false);
1788  uiItemR(col, ptr, "limit_method", DEFAULT_FLAGS, NULL, ICON_NONE);
1789 
1790  if (RNA_enum_get(ptr, "limit_method") == 0) {
1791  uiItemL(col, IFACE_("Limiting Channel:"), ICON_NONE);
1792  row = uiLayoutRow(col, false);
1793  uiItemR(row, ptr, "limit_channel", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1794  }
1795 
1796  uiItemR(col, ptr, "ratio", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1797  uiItemR(col, ptr, "use_unspill", DEFAULT_FLAGS, NULL, ICON_NONE);
1798  if (RNA_boolean_get(ptr, "use_unspill") == true) {
1799  uiItemR(col, ptr, "unspill_red", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1800  uiItemR(col, ptr, "unspill_green", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1801  uiItemR(col, ptr, "unspill_blue", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1802  }
1803 }
1804 
1806 {
1807  uiLayout *col;
1808 
1809  col = uiLayoutColumn(layout, false);
1810  uiItemR(col, ptr, "tolerance", DEFAULT_FLAGS, NULL, ICON_NONE);
1811  uiItemR(col, ptr, "threshold", DEFAULT_FLAGS, NULL, ICON_NONE);
1812 
1813  col = uiLayoutColumn(layout, true);
1814  /*uiItemR(col, ptr, "lift", UI_ITEM_R_SLIDER, NULL, ICON_NONE); Removed for now */
1815  uiItemR(col, ptr, "gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1816  /*uiItemR(col, ptr, "shadow_adjust", UI_ITEM_R_SLIDER, NULL, ICON_NONE); Removed for now*/
1817 }
1818 
1820 {
1821  uiLayout *col;
1822 
1823  col = uiLayoutColumn(layout, true);
1824  uiItemR(col, ptr, "color_hue", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1825  uiItemR(col, ptr, "color_saturation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1826  uiItemR(col, ptr, "color_value", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1827 }
1828 
1830  bContext *UNUSED(C),
1831  PointerRNA *ptr)
1832 {
1833  uiLayout *col, *row;
1834 
1835  uiItemL(layout, IFACE_("Color Space:"), ICON_NONE);
1836  row = uiLayoutRow(layout, false);
1837  uiItemR(row, ptr, "color_space", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1838 
1839  col = uiLayoutColumn(layout, false);
1840  uiItemL(col, IFACE_("Key Channel:"), ICON_NONE);
1841  row = uiLayoutRow(col, false);
1842  uiItemR(row, ptr, "matte_channel", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1843 
1844  col = uiLayoutColumn(layout, false);
1845 
1846  uiItemR(col, ptr, "limit_method", DEFAULT_FLAGS, NULL, ICON_NONE);
1847  if (RNA_enum_get(ptr, "limit_method") == 0) {
1848  uiItemL(col, IFACE_("Limiting Channel:"), ICON_NONE);
1849  row = uiLayoutRow(col, false);
1850  uiItemR(row, ptr, "limit_channel", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
1851  }
1852 
1853  uiItemR(col, ptr, "limit_max", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1854  uiItemR(col, ptr, "limit_min", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1855 }
1856 
1858 {
1859  uiLayout *col;
1860 
1861  col = uiLayoutColumn(layout, true);
1862  uiItemR(col, ptr, "limit_max", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1863  uiItemR(col, ptr, "limit_min", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
1864 }
1865 
1867 {
1868  uiItemR(layout, ptr, "alpha", DEFAULT_FLAGS, NULL, ICON_NONE);
1869 }
1870 
1872 {
1873  uiItemR(layout, ptr, "index", DEFAULT_FLAGS, NULL, ICON_NONE);
1874  uiItemR(layout, ptr, "use_antialiasing", DEFAULT_FLAGS, NULL, ICON_NONE);
1875 }
1876 
1878 {
1879  PointerRNA imfptr = RNA_pointer_get(ptr, "format");
1880  const bool multilayer = RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_MULTILAYER;
1881 
1882  if (multilayer) {
1883  uiItemL(layout, IFACE_("Path:"), ICON_NONE);
1884  }
1885  else {
1886  uiItemL(layout, IFACE_("Base Path:"), ICON_NONE);
1887  }
1888  uiItemR(layout, ptr, "base_path", DEFAULT_FLAGS, "", ICON_NONE);
1889 }
1891 {
1893  PointerRNA imfptr = RNA_pointer_get(ptr, "format");
1894  PointerRNA active_input_ptr, op_ptr;
1895  uiLayout *row, *col;
1896  const bool multilayer = RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_MULTILAYER;
1897  const bool is_exr = RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_OPENEXR;
1898  const bool is_multiview = (scene->r.scemode & R_MULTIVIEW) != 0;
1899 
1901  uiTemplateImageSettings(layout, &imfptr, false);
1902 
1903  /* disable stereo output for multilayer, too much work for something that no one will use */
1904  /* if someone asks for that we can implement it */
1905  if (is_multiview) {
1906  uiTemplateImageFormatViews(layout, &imfptr, NULL);
1907  }
1908 
1909  uiItemS(layout);
1910 
1911  uiItemO(layout, IFACE_("Add Input"), ICON_ADD, "NODE_OT_output_file_add_socket");
1912 
1913  row = uiLayoutRow(layout, false);
1914  col = uiLayoutColumn(row, true);
1915 
1916  const int active_index = RNA_int_get(ptr, "active_input_index");
1917  /* using different collection properties if multilayer format is enabled */
1918  if (multilayer) {
1920  C,
1921  "UI_UL_list",
1922  "file_output_node",
1923  ptr,
1924  "layer_slots",
1925  ptr,
1926  "active_input_index",
1927  NULL,
1928  0,
1929  0,
1930  0,
1931  0,
1932  false,
1933  false);
1935  ptr, RNA_struct_find_property(ptr, "layer_slots"), active_index, &active_input_ptr);
1936  }
1937  else {
1939  C,
1940  "UI_UL_list",
1941  "file_output_node",
1942  ptr,
1943  "file_slots",
1944  ptr,
1945  "active_input_index",
1946  NULL,
1947  0,
1948  0,
1949  0,
1950  0,
1951  false,
1952  false);
1954  ptr, RNA_struct_find_property(ptr, "file_slots"), active_index, &active_input_ptr);
1955  }
1956  /* XXX collection lookup does not return the ID part of the pointer,
1957  * setting this manually here */
1958  active_input_ptr.owner_id = ptr->owner_id;
1959 
1960  col = uiLayoutColumn(row, true);
1961  wmOperatorType *ot = WM_operatortype_find("NODE_OT_output_file_move_active_socket", false);
1962  uiItemFullO_ptr(col, ot, "", ICON_TRIA_UP, NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr);
1963  RNA_enum_set(&op_ptr, "direction", 1);
1964  uiItemFullO_ptr(col, ot, "", ICON_TRIA_DOWN, NULL, WM_OP_INVOKE_DEFAULT, 0, &op_ptr);
1965  RNA_enum_set(&op_ptr, "direction", 2);
1966 
1967  if (active_input_ptr.data) {
1968  if (multilayer) {
1969  col = uiLayoutColumn(layout, true);
1970 
1971  uiItemL(col, IFACE_("Layer:"), ICON_NONE);
1972  row = uiLayoutRow(col, false);
1973  uiItemR(row, &active_input_ptr, "name", DEFAULT_FLAGS, "", ICON_NONE);
1974  uiItemFullO(row,
1975  "NODE_OT_output_file_remove_active_socket",
1976  "",
1977  ICON_X,
1978  NULL,
1981  NULL);
1982  }
1983  else {
1984  col = uiLayoutColumn(layout, true);
1985 
1986  uiItemL(col, IFACE_("File Subpath:"), ICON_NONE);
1987  row = uiLayoutRow(col, false);
1988  uiItemR(row, &active_input_ptr, "path", DEFAULT_FLAGS, "", ICON_NONE);
1989  uiItemFullO(row,
1990  "NODE_OT_output_file_remove_active_socket",
1991  "",
1992  ICON_X,
1993  NULL,
1996  NULL);
1997 
1998  /* format details for individual files */
1999  imfptr = RNA_pointer_get(&active_input_ptr, "format");
2000 
2001  col = uiLayoutColumn(layout, true);
2002  uiItemL(col, IFACE_("Format:"), ICON_NONE);
2003  uiItemR(col, &active_input_ptr, "use_node_format", DEFAULT_FLAGS, NULL, ICON_NONE);
2004 
2005  const bool is_socket_exr = RNA_enum_get(&imfptr, "file_format") == R_IMF_IMTYPE_OPENEXR;
2006  const bool use_node_format = RNA_boolean_get(&active_input_ptr, "use_node_format");
2007 
2008  if ((!is_exr && use_node_format) || (!is_socket_exr && !use_node_format)) {
2009  uiItemR(col, &active_input_ptr, "save_as_render", DEFAULT_FLAGS, NULL, ICON_NONE);
2010  }
2011 
2012  col = uiLayoutColumn(layout, false);
2013  uiLayoutSetActive(col, use_node_format == false);
2014  uiTemplateImageSettings(col, &imfptr, false);
2015 
2016  if (is_multiview) {
2017  uiTemplateImageFormatViews(layout, &imfptr, NULL);
2018  }
2019  }
2020  }
2021 }
2022 
2024 {
2025  uiItemR(layout, ptr, "space", DEFAULT_FLAGS, "", ICON_NONE);
2026 
2027  if (RNA_enum_get(ptr, "space") == CMP_SCALE_RENDERPERCENT) {
2028  uiLayout *row;
2029  uiItemR(layout, ptr, "frame_method", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
2030  row = uiLayoutRow(layout, true);
2031  uiItemR(row, ptr, "offset_x", DEFAULT_FLAGS, "X", ICON_NONE);
2032  uiItemR(row, ptr, "offset_y", DEFAULT_FLAGS, "Y", ICON_NONE);
2033  }
2034 }
2035 
2037 {
2038  uiItemR(layout, ptr, "filter_type", DEFAULT_FLAGS, "", ICON_NONE);
2039 }
2040 
2042 {
2043  uiLayout *col;
2044 
2045  col = uiLayoutColumn(layout, false);
2046  uiItemR(col, ptr, "invert_rgb", DEFAULT_FLAGS, NULL, ICON_NONE);
2047  uiItemR(col, ptr, "invert_alpha", DEFAULT_FLAGS, NULL, ICON_NONE);
2048 }
2049 
2051 {
2052  uiItemR(layout, ptr, "mapping", DEFAULT_FLAGS, "", ICON_NONE);
2053 }
2054 
2056 {
2057  uiItemR(layout, ptr, "channel", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
2058 }
2059 
2061 {
2062  uiLayout *split, *col, *row;
2063 
2064  uiItemR(layout, ptr, "correction_method", DEFAULT_FLAGS, NULL, ICON_NONE);
2065 
2066  if (RNA_enum_get(ptr, "correction_method") == 0) {
2067 
2068  split = uiLayoutSplit(layout, 0.0f, false);
2069  col = uiLayoutColumn(split, false);
2070  uiTemplateColorPicker(col, ptr, "lift", 1, 1, 0, 1);
2071  row = uiLayoutRow(col, false);
2072  uiItemR(row, ptr, "lift", DEFAULT_FLAGS, NULL, ICON_NONE);
2073 
2074  col = uiLayoutColumn(split, false);
2075  uiTemplateColorPicker(col, ptr, "gamma", 1, 1, 1, 1);
2076  row = uiLayoutRow(col, false);
2077  uiItemR(row, ptr, "gamma", DEFAULT_FLAGS, NULL, ICON_NONE);
2078 
2079  col = uiLayoutColumn(split, false);
2080  uiTemplateColorPicker(col, ptr, "gain", 1, 1, 1, 1);
2081  row = uiLayoutRow(col, false);
2082  uiItemR(row, ptr, "gain", DEFAULT_FLAGS, NULL, ICON_NONE);
2083  }
2084  else {
2085 
2086  split = uiLayoutSplit(layout, 0.0f, false);
2087  col = uiLayoutColumn(split, false);
2088  uiTemplateColorPicker(col, ptr, "offset", 1, 1, 0, 1);
2089  row = uiLayoutRow(col, false);
2090  uiItemR(row, ptr, "offset", DEFAULT_FLAGS, NULL, ICON_NONE);
2091  uiItemR(col, ptr, "offset_basis", DEFAULT_FLAGS, NULL, ICON_NONE);
2092 
2093  col = uiLayoutColumn(split, false);
2094  uiTemplateColorPicker(col, ptr, "power", 1, 1, 0, 1);
2095  row = uiLayoutRow(col, false);
2096  uiItemR(row, ptr, "power", DEFAULT_FLAGS, NULL, ICON_NONE);
2097 
2098  col = uiLayoutColumn(split, false);
2099  uiTemplateColorPicker(col, ptr, "slope", 1, 1, 0, 1);
2100  row = uiLayoutRow(col, false);
2101  uiItemR(row, ptr, "slope", DEFAULT_FLAGS, NULL, ICON_NONE);
2102  }
2103 }
2105  bContext *UNUSED(C),
2106  PointerRNA *ptr)
2107 {
2108  uiItemR(layout, ptr, "correction_method", DEFAULT_FLAGS, NULL, ICON_NONE);
2109 
2110  if (RNA_enum_get(ptr, "correction_method") == 0) {
2111 
2112  uiTemplateColorPicker(layout, ptr, "lift", 1, 1, 0, 1);
2113  uiItemR(layout, ptr, "lift", DEFAULT_FLAGS, NULL, ICON_NONE);
2114 
2115  uiTemplateColorPicker(layout, ptr, "gamma", 1, 1, 1, 1);
2116  uiItemR(layout, ptr, "gamma", DEFAULT_FLAGS, NULL, ICON_NONE);
2117 
2118  uiTemplateColorPicker(layout, ptr, "gain", 1, 1, 1, 1);
2119  uiItemR(layout, ptr, "gain", DEFAULT_FLAGS, NULL, ICON_NONE);
2120  }
2121  else {
2122  uiTemplateColorPicker(layout, ptr, "offset", 1, 1, 0, 1);
2123  uiItemR(layout, ptr, "offset", DEFAULT_FLAGS, NULL, ICON_NONE);
2124 
2125  uiTemplateColorPicker(layout, ptr, "power", 1, 1, 0, 1);
2126  uiItemR(layout, ptr, "power", DEFAULT_FLAGS, NULL, ICON_NONE);
2127 
2128  uiTemplateColorPicker(layout, ptr, "slope", 1, 1, 0, 1);
2129  uiItemR(layout, ptr, "slope", DEFAULT_FLAGS, NULL, ICON_NONE);
2130  }
2131 }
2132 
2134 {
2135  bNode *node = ptr->data;
2136  CurveMapping *cumap = node->storage;
2137 
2138  if (_sample_col[0] != SAMPLE_FLT_ISNONE) {
2139  cumap->flag |= CUMA_DRAW_SAMPLE;
2140  copy_v3_v3(cumap->sample, _sample_col);
2141  }
2142  else {
2143  cumap->flag &= ~CUMA_DRAW_SAMPLE;
2144  }
2145 
2146  uiTemplateCurveMapping(layout, ptr, "mapping", 'h', false, false, false, false);
2147 }
2148 
2150 {
2151  uiItemR(layout, ptr, "mode", DEFAULT_FLAGS, "", ICON_NONE);
2152 }
2153 
2155 {
2156  uiTemplateID(
2157  layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2158 }
2159 
2161 {
2162  bNode *node = ptr->data;
2163  PointerRNA clipptr;
2164 
2165  uiTemplateID(
2166  layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2167 
2168  if (!node->id) {
2169  return;
2170  }
2171 
2172  clipptr = RNA_pointer_get(ptr, "clip");
2173 
2174  uiTemplateColorspaceSettings(layout, &clipptr, "colorspace_settings");
2175 }
2176 
2178 {
2179  bNode *node = ptr->data;
2180 
2181  uiTemplateID(
2182  layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2183 
2184  if (!node->id) {
2185  return;
2186  }
2187 
2188  uiItemR(layout, ptr, "filter_type", DEFAULT_FLAGS, "", ICON_NONE);
2189  uiItemR(layout, ptr, "invert", DEFAULT_FLAGS, NULL, ICON_NONE);
2190 }
2191 
2193 {
2194  uiItemR(layout, ptr, "use_relative", DEFAULT_FLAGS, NULL, ICON_NONE);
2195  uiItemR(layout, ptr, "wrap_axis", DEFAULT_FLAGS, NULL, ICON_NONE);
2196 }
2197 
2199 {
2200  uiItemR(layout, ptr, "filter_type", DEFAULT_FLAGS, "", ICON_NONE);
2201 }
2202 
2204 {
2205  bNode *node = ptr->data;
2206 
2207  uiTemplateID(
2208  layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2209 
2210  if (!node->id) {
2211  return;
2212  }
2213 
2214  uiItemR(layout, ptr, "distortion_type", DEFAULT_FLAGS, "", ICON_NONE);
2215 }
2216 
2218  bContext *UNUSED(C),
2219  PointerRNA *ptr)
2220 {
2221  uiLayout *row;
2222 
2223  row = uiLayoutRow(layout, false);
2224  uiItemR(row, ptr, "red", DEFAULT_FLAGS, NULL, ICON_NONE);
2225  uiItemR(row, ptr, "green", DEFAULT_FLAGS, NULL, ICON_NONE);
2226  uiItemR(row, ptr, "blue", DEFAULT_FLAGS, NULL, ICON_NONE);
2227 
2228  row = uiLayoutRow(layout, false);
2229  uiItemL(row, "", ICON_NONE);
2230  uiItemL(row, IFACE_("Saturation"), ICON_NONE);
2231  uiItemL(row, IFACE_("Contrast"), ICON_NONE);
2232  uiItemL(row, IFACE_("Gamma"), ICON_NONE);
2233  uiItemL(row, IFACE_("Gain"), ICON_NONE);
2234  uiItemL(row, IFACE_("Lift"), ICON_NONE);
2235 
2236  row = uiLayoutRow(layout, false);
2237  uiItemL(row, IFACE_("Master"), ICON_NONE);
2238  uiItemR(row, ptr, "master_saturation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2239  uiItemR(row, ptr, "master_contrast", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2240  uiItemR(row, ptr, "master_gamma", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2241  uiItemR(row, ptr, "master_gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2242  uiItemR(row, ptr, "master_lift", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2243 
2244  row = uiLayoutRow(layout, false);
2245  uiItemL(row, IFACE_("Highlights"), ICON_NONE);
2246  uiItemR(row, ptr, "highlights_saturation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2247  uiItemR(row, ptr, "highlights_contrast", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2248  uiItemR(row, ptr, "highlights_gamma", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2249  uiItemR(row, ptr, "highlights_gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2250  uiItemR(row, ptr, "highlights_lift", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2251 
2252  row = uiLayoutRow(layout, false);
2253  uiItemL(row, IFACE_("Midtones"), ICON_NONE);
2254  uiItemR(row, ptr, "midtones_saturation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2255  uiItemR(row, ptr, "midtones_contrast", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2256  uiItemR(row, ptr, "midtones_gamma", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2257  uiItemR(row, ptr, "midtones_gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2258  uiItemR(row, ptr, "midtones_lift", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2259 
2260  row = uiLayoutRow(layout, false);
2261  uiItemL(row, IFACE_("Shadows"), ICON_NONE);
2262  uiItemR(row, ptr, "shadows_saturation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2263  uiItemR(row, ptr, "shadows_contrast", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2264  uiItemR(row, ptr, "shadows_gamma", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2265  uiItemR(row, ptr, "shadows_gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2266  uiItemR(row, ptr, "shadows_lift", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, "", ICON_NONE);
2267 
2268  row = uiLayoutRow(layout, false);
2269  uiItemR(row, ptr, "midtones_start", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2270  uiItemR(row, ptr, "midtones_end", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2271 }
2272 
2274  bContext *UNUSED(C),
2275  PointerRNA *ptr)
2276 {
2277  uiLayout *row;
2278 
2279  row = uiLayoutRow(layout, false);
2280  uiItemR(row, ptr, "red", DEFAULT_FLAGS, NULL, ICON_NONE);
2281  uiItemR(row, ptr, "green", DEFAULT_FLAGS, NULL, ICON_NONE);
2282  uiItemR(row, ptr, "blue", DEFAULT_FLAGS, NULL, ICON_NONE);
2283  row = layout;
2284  uiItemL(row, IFACE_("Saturation"), ICON_NONE);
2285  uiItemR(row, ptr, "master_saturation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2286  uiItemR(row, ptr, "highlights_saturation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2287  uiItemR(row, ptr, "midtones_saturation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2288  uiItemR(row, ptr, "shadows_saturation", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2289 
2290  uiItemL(row, IFACE_("Contrast"), ICON_NONE);
2291  uiItemR(row, ptr, "master_contrast", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2292  uiItemR(row, ptr, "highlights_contrast", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2293  uiItemR(row, ptr, "midtones_contrast", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2294  uiItemR(row, ptr, "shadows_contrast", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2295 
2296  uiItemL(row, IFACE_("Gamma"), ICON_NONE);
2297  uiItemR(row, ptr, "master_gamma", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2298  uiItemR(row, ptr, "highlights_gamma", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2299  uiItemR(row, ptr, "midtones_gamma", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2300  uiItemR(row, ptr, "shadows_gamma", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2301 
2302  uiItemL(row, IFACE_("Gain"), ICON_NONE);
2303  uiItemR(row, ptr, "master_gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2304  uiItemR(row, ptr, "highlights_gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2305  uiItemR(row, ptr, "midtones_gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2306  uiItemR(row, ptr, "shadows_gain", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2307 
2308  uiItemL(row, IFACE_("Lift"), ICON_NONE);
2309  uiItemR(row, ptr, "master_lift", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2310  uiItemR(row, ptr, "highlights_lift", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2311  uiItemR(row, ptr, "midtones_lift", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2312  uiItemR(row, ptr, "shadows_lift", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2313 
2314  row = uiLayoutRow(layout, false);
2315  uiItemR(row, ptr, "midtones_start", DEFAULT_FLAGS, NULL, ICON_NONE);
2316  uiItemR(row, ptr, "midtones_end", DEFAULT_FLAGS, NULL, ICON_NONE);
2317 }
2318 
2320 {
2321  uiItemR(layout, ptr, "mode", DEFAULT_FLAGS, NULL, ICON_NONE);
2322 }
2323 
2325 {
2326  uiItemR(layout, ptr, "check", DEFAULT_FLAGS, NULL, ICON_NONE);
2327 }
2328 
2330  bContext *UNUSED(C),
2331  PointerRNA *UNUSED(ptr))
2332 {
2333  uiItemFullO(layout,
2334  "NODE_OT_switch_view_update",
2335  "Update Views",
2336  ICON_FILE_REFRESH,
2337  NULL,
2339  0,
2340  NULL);
2341 }
2342 
2344 {
2345  uiLayout *row;
2346 
2347  row = uiLayoutRow(layout, true);
2348  uiItemR(row, ptr, "x", DEFAULT_FLAGS, NULL, ICON_NONE);
2349  uiItemR(row, ptr, "y", DEFAULT_FLAGS, NULL, ICON_NONE);
2350 
2351  row = uiLayoutRow(layout, true);
2352  uiItemR(row, ptr, "width", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2353  uiItemR(row, ptr, "height", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2354 
2355  uiItemR(layout, ptr, "rotation", DEFAULT_FLAGS, NULL, ICON_NONE);
2356  uiItemR(layout, ptr, "mask_type", DEFAULT_FLAGS, NULL, ICON_NONE);
2357 }
2358 
2360 {
2361  uiItemR(layout, ptr, "flaps", DEFAULT_FLAGS, NULL, ICON_NONE);
2362  uiItemR(layout, ptr, "angle", DEFAULT_FLAGS, NULL, ICON_NONE);
2363  uiItemR(layout, ptr, "rounding", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2364  uiItemR(layout, ptr, "catadioptric", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2365  uiItemR(layout, ptr, "shift", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2366 }
2367 
2369 {
2370  uiItemR(layout, ptr, "use_variable_size", DEFAULT_FLAGS, NULL, ICON_NONE);
2371  // uiItemR(layout, ptr, "f_stop", DEFAULT_FLAGS, NULL, ICON_NONE); /* UNUSED */
2372  uiItemR(layout, ptr, "blur_max", DEFAULT_FLAGS, NULL, ICON_NONE);
2373  uiItemR(layout, ptr, "use_extended_bounds", DEFAULT_FLAGS, NULL, ICON_NONE);
2374 }
2375 
2377  SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
2378 {
2379  // node_composit_backdrop_canvas(snode, backdrop, node, x, y);
2380  if (node->custom1 == 0) {
2381  const float backdropWidth = backdrop->x;
2382  const float backdropHeight = backdrop->y;
2383  const float cx = x + snode->zoom * backdropWidth * node->custom3;
2384  const float cy = y + snode->zoom * backdropHeight * node->custom4;
2385  const float cross_size = 12 * U.pixelsize;
2386 
2389 
2391 
2392  immUniformColor3f(1.0f, 1.0f, 1.0f);
2393 
2395  immVertex2f(pos, cx - cross_size, cy - cross_size);
2396  immVertex2f(pos, cx + cross_size, cy + cross_size);
2397  immVertex2f(pos, cx + cross_size, cy - cross_size);
2398  immVertex2f(pos, cx - cross_size, cy + cross_size);
2399  immEnd();
2400 
2401  immUnbindProgram();
2402  }
2403 }
2404 
2406  SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
2407 {
2408  NodeBoxMask *boxmask = node->storage;
2409  const float backdropWidth = backdrop->x;
2410  const float backdropHeight = backdrop->y;
2411  const float aspect = backdropWidth / backdropHeight;
2412  const float rad = -boxmask->rotation;
2413  const float cosine = cosf(rad);
2414  const float sine = sinf(rad);
2415  const float halveBoxWidth = backdropWidth * (boxmask->width / 2.0f);
2416  const float halveBoxHeight = backdropHeight * (boxmask->height / 2.0f) * aspect;
2417 
2418  float cx, cy, x1, x2, x3, x4;
2419  float y1, y2, y3, y4;
2420 
2421  cx = x + snode->zoom * backdropWidth * boxmask->x;
2422  cy = y + snode->zoom * backdropHeight * boxmask->y;
2423 
2424  x1 = cx - (cosine * halveBoxWidth + sine * halveBoxHeight) * snode->zoom;
2425  x2 = cx - (cosine * -halveBoxWidth + sine * halveBoxHeight) * snode->zoom;
2426  x3 = cx - (cosine * -halveBoxWidth + sine * -halveBoxHeight) * snode->zoom;
2427  x4 = cx - (cosine * halveBoxWidth + sine * -halveBoxHeight) * snode->zoom;
2428  y1 = cy - (-sine * halveBoxWidth + cosine * halveBoxHeight) * snode->zoom;
2429  y2 = cy - (-sine * -halveBoxWidth + cosine * halveBoxHeight) * snode->zoom;
2430  y3 = cy - (-sine * -halveBoxWidth + cosine * -halveBoxHeight) * snode->zoom;
2431  y4 = cy - (-sine * halveBoxWidth + cosine * -halveBoxHeight) * snode->zoom;
2432 
2435 
2437 
2438  immUniformColor3f(1.0f, 1.0f, 1.0f);
2439 
2441  immVertex2f(pos, x1, y1);
2442  immVertex2f(pos, x2, y2);
2443  immVertex2f(pos, x3, y3);
2444  immVertex2f(pos, x4, y4);
2445  immEnd();
2446 
2447  immUnbindProgram();
2448 }
2449 
2451  SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
2452 {
2453  NodeEllipseMask *ellipsemask = node->storage;
2454  const float backdropWidth = backdrop->x;
2455  const float backdropHeight = backdrop->y;
2456  const float aspect = backdropWidth / backdropHeight;
2457  const float rad = -ellipsemask->rotation;
2458  const float cosine = cosf(rad);
2459  const float sine = sinf(rad);
2460  const float halveBoxWidth = backdropWidth * (ellipsemask->width / 2.0f);
2461  const float halveBoxHeight = backdropHeight * (ellipsemask->height / 2.0f) * aspect;
2462 
2463  float cx, cy, x1, x2, x3, x4;
2464  float y1, y2, y3, y4;
2465 
2466  cx = x + snode->zoom * backdropWidth * ellipsemask->x;
2467  cy = y + snode->zoom * backdropHeight * ellipsemask->y;
2468 
2469  x1 = cx - (cosine * halveBoxWidth + sine * halveBoxHeight) * snode->zoom;
2470  x2 = cx - (cosine * -halveBoxWidth + sine * halveBoxHeight) * snode->zoom;
2471  x3 = cx - (cosine * -halveBoxWidth + sine * -halveBoxHeight) * snode->zoom;
2472  x4 = cx - (cosine * halveBoxWidth + sine * -halveBoxHeight) * snode->zoom;
2473  y1 = cy - (-sine * halveBoxWidth + cosine * halveBoxHeight) * snode->zoom;
2474  y2 = cy - (-sine * -halveBoxWidth + cosine * halveBoxHeight) * snode->zoom;
2475  y3 = cy - (-sine * -halveBoxWidth + cosine * -halveBoxHeight) * snode->zoom;
2476  y4 = cy - (-sine * halveBoxWidth + cosine * -halveBoxHeight) * snode->zoom;
2477 
2480 
2482 
2483  immUniformColor3f(1.0f, 1.0f, 1.0f);
2484 
2486  immVertex2f(pos, x1, y1);
2487  immVertex2f(pos, x2, y2);
2488  immVertex2f(pos, x3, y3);
2489  immVertex2f(pos, x4, y4);
2490  immEnd();
2491 
2492  immUnbindProgram();
2493 }
2494 
2496 {
2497  uiLayout *row;
2498  row = uiLayoutRow(layout, true);
2499  uiItemR(row, ptr, "x", DEFAULT_FLAGS, NULL, ICON_NONE);
2500  uiItemR(row, ptr, "y", DEFAULT_FLAGS, NULL, ICON_NONE);
2501  row = uiLayoutRow(layout, true);
2502  uiItemR(row, ptr, "width", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2503  uiItemR(row, ptr, "height", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2504 
2505  uiItemR(layout, ptr, "rotation", DEFAULT_FLAGS, NULL, ICON_NONE);
2506  uiItemR(layout, ptr, "mask_type", DEFAULT_FLAGS, NULL, ICON_NONE);
2507 }
2508 
2510 {
2511  uiItemR(layout, ptr, "use_alpha", DEFAULT_FLAGS, NULL, ICON_NONE);
2512 }
2513 
2515 {
2516  uiItemR(layout, ptr, "use_alpha", DEFAULT_FLAGS, NULL, ICON_NONE);
2517 }
2518 
2520 {
2521  uiLayout *col;
2522 
2523  uiItemR(layout, ptr, "use_alpha", DEFAULT_FLAGS, NULL, ICON_NONE);
2524  uiItemR(layout, ptr, "tile_order", DEFAULT_FLAGS, NULL, ICON_NONE);
2525  if (RNA_enum_get(ptr, "tile_order") == 0) {
2526  col = uiLayoutColumn(layout, true);
2527  uiItemR(col, ptr, "center_x", DEFAULT_FLAGS, NULL, ICON_NONE);
2528  uiItemR(col, ptr, "center_y", DEFAULT_FLAGS, NULL, ICON_NONE);
2529  }
2530 }
2531 
2533 {
2534  bNode *node = ptr->data;
2535 
2536  uiTemplateID(layout, C, ptr, "mask", NULL, NULL, NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2537  uiItemR(layout, ptr, "use_feather", DEFAULT_FLAGS, NULL, ICON_NONE);
2538 
2539  uiItemR(layout, ptr, "size_source", DEFAULT_FLAGS, "", ICON_NONE);
2540 
2542  uiItemR(layout, ptr, "size_x", DEFAULT_FLAGS, NULL, ICON_NONE);
2543  uiItemR(layout, ptr, "size_y", DEFAULT_FLAGS, NULL, ICON_NONE);
2544  }
2545 
2546  uiItemR(layout, ptr, "use_motion_blur", DEFAULT_FLAGS, NULL, ICON_NONE);
2547  if (node->custom1 & CMP_NODEFLAG_MASK_MOTION_BLUR) {
2548  uiItemR(layout, ptr, "motion_blur_samples", DEFAULT_FLAGS, NULL, ICON_NONE);
2549  uiItemR(layout, ptr, "motion_blur_shutter", DEFAULT_FLAGS, NULL, ICON_NONE);
2550  }
2551 }
2552 
2554 {
2555  bNode *node = ptr->data;
2556 
2557  uiTemplateID(layout, C, ptr, "clip", NULL, NULL, NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2558 
2559  if (node->id) {
2560  MovieClip *clip = (MovieClip *)node->id;
2561  uiLayout *col;
2562  PointerRNA tracking_ptr;
2563 
2564  RNA_pointer_create(&clip->id, &RNA_MovieTracking, &clip->tracking, &tracking_ptr);
2565 
2566  col = uiLayoutColumn(layout, true);
2567  uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA);
2568  }
2569 }
2570 
2572 {
2573  /* bNode *node = ptr->data; */ /* UNUSED */
2574 
2575  uiItemR(layout, ptr, "blur_pre", DEFAULT_FLAGS, NULL, ICON_NONE);
2576  uiItemR(layout, ptr, "screen_balance", DEFAULT_FLAGS, NULL, ICON_NONE);
2577  uiItemR(layout, ptr, "despill_factor", DEFAULT_FLAGS, NULL, ICON_NONE);
2578  uiItemR(layout, ptr, "despill_balance", DEFAULT_FLAGS, NULL, ICON_NONE);
2579  uiItemR(layout, ptr, "edge_kernel_radius", DEFAULT_FLAGS, NULL, ICON_NONE);
2580  uiItemR(layout, ptr, "edge_kernel_tolerance", DEFAULT_FLAGS, NULL, ICON_NONE);
2581  uiItemR(layout, ptr, "clip_black", DEFAULT_FLAGS, NULL, ICON_NONE);
2582  uiItemR(layout, ptr, "clip_white", DEFAULT_FLAGS, NULL, ICON_NONE);
2583  uiItemR(layout, ptr, "dilate_distance", DEFAULT_FLAGS, NULL, ICON_NONE);
2584  uiItemR(layout, ptr, "feather_falloff", DEFAULT_FLAGS, NULL, ICON_NONE);
2585  uiItemR(layout, ptr, "feather_distance", DEFAULT_FLAGS, NULL, ICON_NONE);
2586  uiItemR(layout, ptr, "blur_post", DEFAULT_FLAGS, NULL, ICON_NONE);
2587 }
2588 
2590 {
2591  bNode *node = ptr->data;
2592 
2593  uiTemplateID(
2594  layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2595 
2596  if (node->id) {
2597  MovieClip *clip = (MovieClip *)node->id;
2598  MovieTracking *tracking = &clip->tracking;
2599  MovieTrackingObject *object;
2600  uiLayout *col;
2601  PointerRNA tracking_ptr;
2602  NodeTrackPosData *data = node->storage;
2603 
2604  RNA_pointer_create(&clip->id, &RNA_MovieTracking, tracking, &tracking_ptr);
2605 
2606  col = uiLayoutColumn(layout, false);
2607  uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA);
2608 
2609  object = BKE_tracking_object_get_named(tracking, data->tracking_object);
2610  if (object) {
2611  PointerRNA object_ptr;
2612 
2613  RNA_pointer_create(&clip->id, &RNA_MovieTrackingObject, object, &object_ptr);
2614 
2615  uiItemPointerR(col, ptr, "track_name", &object_ptr, "tracks", "", ICON_ANIM_DATA);
2616  }
2617  else {
2618  uiItemR(layout, ptr, "track_name", DEFAULT_FLAGS, "", ICON_ANIM_DATA);
2619  }
2620 
2621  uiItemR(layout, ptr, "position", DEFAULT_FLAGS, NULL, ICON_NONE);
2622 
2624  uiItemR(layout, ptr, "frame_relative", DEFAULT_FLAGS, NULL, ICON_NONE);
2625  }
2626  }
2627 }
2628 
2630 {
2631  bNode *node = ptr->data;
2632  NodePlaneTrackDeformData *data = node->storage;
2633 
2634  uiTemplateID(
2635  layout, C, ptr, "clip", NULL, "CLIP_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2636 
2637  if (node->id) {
2638  MovieClip *clip = (MovieClip *)node->id;
2639  MovieTracking *tracking = &clip->tracking;
2640  MovieTrackingObject *object;
2641  uiLayout *col;
2642  PointerRNA tracking_ptr;
2643 
2644  RNA_pointer_create(&clip->id, &RNA_MovieTracking, tracking, &tracking_ptr);
2645 
2646  col = uiLayoutColumn(layout, false);
2647  uiItemPointerR(col, ptr, "tracking_object", &tracking_ptr, "objects", "", ICON_OBJECT_DATA);
2648 
2649  object = BKE_tracking_object_get_named(tracking, data->tracking_object);
2650  if (object) {
2651  PointerRNA object_ptr;
2652 
2653  RNA_pointer_create(&clip->id, &RNA_MovieTrackingObject, object, &object_ptr);
2654 
2656  col, ptr, "plane_track_name", &object_ptr, "plane_tracks", "", ICON_ANIM_DATA);
2657  }
2658  else {
2659  uiItemR(layout, ptr, "plane_track_name", 0, "", ICON_ANIM_DATA);
2660  }
2661  }
2662 
2663  uiItemR(layout, ptr, "use_motion_blur", DEFAULT_FLAGS, NULL, ICON_NONE);
2665  uiItemR(layout, ptr, "motion_blur_samples", DEFAULT_FLAGS, NULL, ICON_NONE);
2666  uiItemR(layout, ptr, "motion_blur_shutter", DEFAULT_FLAGS, NULL, ICON_NONE);
2667  }
2668 }
2669 
2671  bContext *UNUSED(C),
2672  PointerRNA *UNUSED(ptr))
2673 {
2674 }
2675 
2677 {
2678  uiItemR(layout, ptr, "source", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, "", ICON_NONE);
2679  uiItemR(layout, ptr, "ray_length", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, NULL, ICON_NONE);
2680 }
2681 
2683  bContext *UNUSED(C),
2684  PointerRNA *ptr)
2685 {
2686  uiLayout *col = uiLayoutColumn(layout, true);
2687 
2688  uiItemL(col, IFACE_("Matte Objects:"), ICON_NONE);
2689 
2690  uiLayout *row = uiLayoutRow(col, true);
2691  uiTemplateCryptoPicker(row, ptr, "add", ICON_ADD);
2692  uiTemplateCryptoPicker(row, ptr, "remove", ICON_REMOVE);
2693 
2694  uiItemR(col, ptr, "matte_id", DEFAULT_FLAGS, "", ICON_NONE);
2695 }
2696 
2698  bContext *UNUSED(C),
2699  PointerRNA *UNUSED(ptr))
2700 {
2701  uiItemO(layout, IFACE_("Add Crypto Layer"), ICON_ADD, "NODE_OT_cryptomatte_layer_add");
2702  uiItemO(layout, IFACE_("Remove Crypto Layer"), ICON_REMOVE, "NODE_OT_cryptomatte_layer_remove");
2703 }
2704 
2706 {
2707  bNode *node = ptr->data;
2708 
2709  uiLayout *row = uiLayoutRow(layout, true);
2710  uiItemR(row, ptr, "source", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
2711 
2712  uiLayout *col = uiLayoutColumn(layout, false);
2713  if (node->custom1 == CMP_CRYPTOMATTE_SRC_RENDER) {
2714  uiTemplateID(col, C, ptr, "scene", NULL, NULL, NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2715  }
2716  else {
2717  uiTemplateID(
2718  col, C, ptr, "image", NULL, "IMAGE_OT_open", NULL, UI_TEMPLATE_ID_FILTER_ALL, false, NULL);
2719 
2720  NodeCryptomatte *crypto = (NodeCryptomatte *)node->storage;
2721  PointerRNA imaptr = RNA_pointer_get(ptr, "image");
2722  PointerRNA iuserptr;
2723  RNA_pointer_create((ID *)ptr->owner_id, &RNA_ImageUser, &crypto->iuser, &iuserptr);
2724  uiLayoutSetContextPointer(layout, "image_user", &iuserptr);
2725 
2726  node_buts_image_user(col, C, ptr, &imaptr, &iuserptr, false, false);
2727  node_buts_image_views(col, C, ptr, &imaptr);
2728  }
2729 
2730  col = uiLayoutColumn(layout, true);
2731  uiItemR(col, ptr, "layer_name", 0, "", ICON_NONE);
2732  uiItemL(col, IFACE_("Matte ID:"), ICON_NONE);
2733 
2734  row = uiLayoutRow(col, true);
2735  uiItemR(row, ptr, "matte_id", DEFAULT_FLAGS, "", ICON_NONE);
2736  uiTemplateCryptoPicker(row, ptr, "add", ICON_ADD);
2737  uiTemplateCryptoPicker(row, ptr, "remove", ICON_REMOVE);
2738 }
2739 
2741  bContext *UNUSED(C),
2742  PointerRNA *ptr)
2743 {
2744  uiItemR(layout, ptr, "use_premultiply", DEFAULT_FLAGS, NULL, ICON_NONE);
2745 }
2746 
2748 {
2749 #ifndef WITH_OPENIMAGEDENOISE
2750  uiItemL(layout, IFACE_("Disabled, built without OpenImageDenoise"), ICON_ERROR);
2751 #else
2752  /* Always supported through Accelerate framework BNNS on macOS. */
2753 # ifndef __APPLE__
2754  if (!BLI_cpu_support_sse41()) {
2755  uiItemL(layout, IFACE_("Disabled, CPU with SSE4.1 is required"), ICON_ERROR);
2756  }
2757 # endif
2758 #endif
2759 
2760  uiItemR(layout, ptr, "use_hdr", DEFAULT_FLAGS, NULL, ICON_NONE);
2761 }
2762 
2763 /* only once called */
2765 {
2766  switch (ntype->type) {
2767  case CMP_NODE_IMAGE:
2770  break;
2771  case CMP_NODE_R_LAYERS:
2773  break;
2774  case CMP_NODE_NORMAL:
2775  ntype->draw_buttons = node_buts_normal;
2776  break;
2777  case CMP_NODE_CURVE_VEC:
2779  break;
2780  case CMP_NODE_CURVE_RGB:
2782  break;
2783  case CMP_NODE_VALUE:
2784  ntype->draw_buttons = node_buts_value;
2785  break;
2786  case CMP_NODE_RGB:
2787  ntype->draw_buttons = node_buts_rgb;
2788  break;
2789  case CMP_NODE_FLIP:
2791  break;
2792  case CMP_NODE_SPLITVIEWER:
2794  break;
2795  case CMP_NODE_MIX_RGB:
2797  break;
2798  case CMP_NODE_VALTORGB:
2800  break;
2801  case CMP_NODE_CROP:
2803  break;
2804  case CMP_NODE_BLUR:
2806  break;
2807  case CMP_NODE_DBLUR:
2809  break;
2812  break;
2813  case CMP_NODE_DEFOCUS:
2815  break;
2816  case CMP_NODE_ANTIALIASING:
2818  break;
2819  case CMP_NODE_GLARE:
2821  break;
2822  case CMP_NODE_TONEMAP:
2824  break;
2825  case CMP_NODE_LENSDIST:
2827  break;
2828  case CMP_NODE_VECBLUR:
2830  break;
2831  case CMP_NODE_FILTER:
2833  break;
2834  case CMP_NODE_MAP_VALUE:
2836  break;
2837  case CMP_NODE_MAP_RANGE:
2839  break;
2840  case CMP_NODE_TIME:
2841  ntype->draw_buttons = node_buts_time;
2842  break;
2843  case CMP_NODE_ALPHAOVER:
2845  break;
2846  case CMP_NODE_TEXTURE:
2848  break;
2849  case CMP_NODE_DILATEERODE:
2851  break;
2852  case CMP_NODE_INPAINT:
2854  break;
2855  case CMP_NODE_DESPECKLE:
2857  break;
2858  case CMP_NODE_OUTPUT_FILE:
2861  break;
2862  case CMP_NODE_DIFF_MATTE:
2864  break;
2865  case CMP_NODE_DIST_MATTE:
2867  break;
2868  case CMP_NODE_COLOR_SPILL:
2870  break;
2871  case CMP_NODE_CHROMA_MATTE:
2873  break;
2874  case CMP_NODE_COLOR_MATTE:
2876  break;
2877  case CMP_NODE_SCALE:
2879  break;
2880  case CMP_NODE_ROTATE:
2882  break;
2885  break;
2886  case CMP_NODE_LUMA_MATTE:
2888  break;
2889  case CMP_NODE_MAP_UV:
2891  break;
2892  case CMP_NODE_ID_MASK:
2894  break;
2897  break;
2898  case CMP_NODE_MATH:
2899  ntype->draw_buttons = node_buts_math;
2900  break;
2901  case CMP_NODE_INVERT:
2903  break;
2904  case CMP_NODE_PREMULKEY:
2906  break;
2907  case CMP_NODE_VIEW_LEVELS:
2909  break;
2910  case CMP_NODE_COLORBALANCE:
2913  break;
2914  case CMP_NODE_HUECORRECT:
2916  break;
2917  case CMP_NODE_ZCOMBINE:
2919  break;
2920  case CMP_NODE_COMBYCCA:
2921  case CMP_NODE_SEPYCCA:
2923  break;
2924  case CMP_NODE_MOVIECLIP:
2927  break;
2928  case CMP_NODE_STABILIZE2D:
2930  break;
2931  case CMP_NODE_TRANSFORM:
2933  break;
2934  case CMP_NODE_TRANSLATE:
2936  break;
2939  break;
2943  break;
2944  case CMP_NODE_SETALPHA:
2946  break;
2947  case CMP_NODE_SWITCH:
2949  break;
2950  case CMP_NODE_SWITCH_VIEW:
2952  break;
2953  case CMP_NODE_MASK_BOX:
2956  break;
2957  case CMP_NODE_MASK_ELLIPSE:
2960  break;
2961  case CMP_NODE_BOKEHIMAGE:
2963  break;
2964  case CMP_NODE_BOKEHBLUR:
2966  break;
2967  case CMP_NODE_VIEWER:
2971  break;
2972  case CMP_NODE_COMPOSITE:
2974  break;
2975  case CMP_NODE_MASK:
2977  break;
2978  case CMP_NODE_KEYINGSCREEN:
2980  break;
2981  case CMP_NODE_KEYING:
2983  break;
2984  case CMP_NODE_TRACKPOS:
2986  break;
2989  break;
2990  case CMP_NODE_CORNERPIN:
2992  break;
2993  case CMP_NODE_SUNBEAMS:
2995  break;
2996  case CMP_NODE_CRYPTOMATTE:
2998  break;
3002  break;
3005  break;
3006  case CMP_NODE_DENOISE:
3008  break;
3009  }
3010 }
3011 
3012 /* ****************** BUTTON CALLBACKS FOR TEXTURE NODES ***************** */
3013 
3015 {
3016  uiLayout *col;
3017 
3018  col = uiLayoutColumn(layout, true);
3019  uiItemR(col, ptr, "offset", DEFAULT_FLAGS | UI_ITEM_R_SLIDER, IFACE_("Offset"), ICON_NONE);
3020  uiItemR(col, ptr, "offset_frequency", DEFAULT_FLAGS, IFACE_("Frequency"), ICON_NONE);
3021 
3022  col = uiLayoutColumn(layout, true);
3023  uiItemR(col, ptr, "squash", DEFAULT_FLAGS, IFACE_("Squash"), ICON_NONE);
3024  uiItemR(col, ptr, "squash_frequency", DEFAULT_FLAGS, IFACE_("Frequency"), ICON_NONE);
3025 }
3026 
3028 {
3029  PointerRNA tex_ptr;
3030  bNode *node = ptr->data;
3031  ID *id = ptr->owner_id;
3032  Tex *tex = (Tex *)node->storage;
3033  uiLayout *col, *row;
3034 
3035  RNA_pointer_create(id, &RNA_Texture, tex, &tex_ptr);
3036 
3037  col = uiLayoutColumn(layout, false);
3038 
3039  switch (tex->type) {
3040  case TEX_BLEND:
3041  uiItemR(col, &tex_ptr, "progression", DEFAULT_FLAGS, "", ICON_NONE);
3042  row = uiLayoutRow(col, false);
3043  uiItemR(row, &tex_ptr, "use_flip_axis", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3044  break;
3045 
3046  case TEX_MARBLE:
3047  row = uiLayoutRow(col, false);
3048  uiItemR(row, &tex_ptr, "marble_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3049  row = uiLayoutRow(col, false);
3050  uiItemR(row, &tex_ptr, "noise_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3051  row = uiLayoutRow(col, false);
3052  uiItemR(row, &tex_ptr, "noise_basis", DEFAULT_FLAGS, "", ICON_NONE);
3053  row = uiLayoutRow(col, false);
3054  uiItemR(row, &tex_ptr, "noise_basis_2", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3055  break;
3056 
3057  case TEX_MAGIC:
3058  uiItemR(col, &tex_ptr, "noise_depth", DEFAULT_FLAGS, NULL, ICON_NONE);
3059  break;
3060 
3061  case TEX_STUCCI:
3062  row = uiLayoutRow(col, false);
3063  uiItemR(row, &tex_ptr, "stucci_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3064  row = uiLayoutRow(col, false);
3065  uiItemR(row, &tex_ptr, "noise_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3066  uiItemR(col, &tex_ptr, "noise_basis", DEFAULT_FLAGS, "", ICON_NONE);
3067  break;
3068 
3069  case TEX_WOOD:
3070  uiItemR(col, &tex_ptr, "noise_basis", DEFAULT_FLAGS, "", ICON_NONE);
3071  uiItemR(col, &tex_ptr, "wood_type", DEFAULT_FLAGS, "", ICON_NONE);
3072  row = uiLayoutRow(col, false);
3073  uiItemR(row, &tex_ptr, "noise_basis_2", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3074  row = uiLayoutRow(col, false);
3076  uiItemR(row, &tex_ptr, "noise_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3077  break;
3078 
3079  case TEX_CLOUDS:
3080  uiItemR(col, &tex_ptr, "noise_basis", DEFAULT_FLAGS, "", ICON_NONE);
3081  row = uiLayoutRow(col, false);
3082  uiItemR(row, &tex_ptr, "cloud_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3083  row = uiLayoutRow(col, false);
3084  uiItemR(row, &tex_ptr, "noise_type", DEFAULT_FLAGS | UI_ITEM_R_EXPAND, NULL, ICON_NONE);
3085  uiItemR(col,
3086  &tex_ptr,
3087  "noise_depth",
3089  IFACE_("Depth"),
3090  ICON_NONE);
3091  break;
3092 
3093  case TEX_DISTNOISE:
3094  uiItemR(col, &tex_ptr, "noise_basis", DEFAULT_FLAGS, "", ICON_NONE);
3095  uiItemR(col, &tex_ptr, "noise_distortion", DEFAULT_FLAGS, "", ICON_NONE);
3096  break;
3097 
3098  case TEX_MUSGRAVE:
3099  uiItemR(col, &tex_ptr, "musgrave_type", DEFAULT_FLAGS, "", ICON_NONE);
3100  uiItemR(col, &tex_ptr, "noise_basis", DEFAULT_FLAGS, "", ICON_NONE);
3101  break;
3102  case TEX_VORONOI:
3103  uiItemR(col, &tex_ptr, "distance_metric", DEFAULT_FLAGS, "", ICON_NONE);
3104  if (tex->vn_distm == TEX_MINKOVSKY) {
3105  uiItemR(col, &tex_ptr, "minkovsky_exponent", DEFAULT_FLAGS, NULL, ICON_NONE);
3106  }
3107  uiItemR(col, &tex_ptr, "color_mode", DEFAULT_FLAGS, "", ICON_NONE);
3108  break;
3109  }
3110 }
3111 
3113 {
3114  uiTemplateID(layout,
3115  C,
3116  ptr,
3117  "image",
3118  "IMAGE_OT_new",
3119  "IMAGE_OT_open",
3120  NULL,
3122  false,
3123  NULL);
3124 }
3125 
3127 {
3128  bNode *node = ptr->data;
3129  PointerRNA iuserptr;
3130 
3131  RNA_pointer_create(ptr->owner_id, &RNA_ImageUser, node->storage, &iuserptr);
3132  uiTemplateImage(layout, C, ptr, "image", &iuserptr, 0, 0);
3133 }
3134 
3136 {
3137  uiItemR(layout, ptr, "filepath", DEFAULT_FLAGS, "", ICON_NONE);
3138 }
3139 
3140 /* only once called */
3142 {
3143  if (ntype->type >= TEX_NODE_PROC && ntype->type < TEX_NODE_PROC_MAX) {
3145  }
3146  else {
3147  switch (ntype->type) {
3148 
3149  case TEX_NODE_MATH:
3150  ntype->draw_buttons = node_buts_math;
3151  break;
3152 
3153  case TEX_NODE_MIX_RGB:
3155  break;
3156 
3157  case TEX_NODE_VALTORGB:
3159  break;
3160 
3161  case TEX_NODE_CURVE_RGB:
3163  break;
3164 
3165  case TEX_NODE_CURVE_TIME:
3166  ntype->draw_buttons = node_buts_time;
3167  break;
3168 
3169  case TEX_NODE_TEXTURE:
3171  break;
3172 
3173  case TEX_NODE_BRICKS:
3175  break;
3176 
3177  case TEX_NODE_IMAGE:
3180  break;
3181 
3182  case TEX_NODE_OUTPUT:
3184  break;
3185  }
3186  }
3187 }
3188 
3189 /* ****** init draw callbacks for all tree types, only called in usiblender.c, once ************ */
3190 
3192 {
3194  bNode *node = ptr->data;
3196 }
3197 
3199 {
3200  StructRNA *srna = ntype->rna_ext.srna;
3202 
3203  if (prop) {
3205  }
3206 }
3207 
3209 {
3210  bNodeSocketTemplate *stemp;
3211 
3212  if (ntype->inputs) {
3213  for (stemp = ntype->inputs; stemp->type >= 0; stemp++) {
3215  }
3216  }
3217  if (ntype->outputs) {
3218  for (stemp = ntype->outputs; stemp->type >= 0; stemp++) {
3220  }
3221  }
3222 }
3223 
3225  uiLayout *layout,
3226  PointerRNA *UNUSED(ptr),
3227  PointerRNA *UNUSED(node_ptr),
3228  const char *UNUSED(text))
3229 {
3230  uiItemL(layout, IFACE_("Undefined Socket Type"), ICON_ERROR);
3231 }
3232 
3234  PointerRNA *UNUSED(ptr),
3235  PointerRNA *UNUSED(node_ptr),
3236  float *r_color)
3237 {
3238  r_color[0] = 1.0f;
3239  r_color[1] = 0.0f;
3240  r_color[2] = 0.0f;
3241  r_color[3] = 1.0f;
3242 }
3243 
3245  uiLayout *layout,
3246  PointerRNA *UNUSED(ptr))
3247 {
3248  uiItemL(layout, IFACE_("Undefined Socket Type"), ICON_ERROR);
3249 }
3250 
3252  PointerRNA *UNUSED(ptr),
3253  float *r_color)
3254 {
3255  r_color[0] = 1.0f;
3256  r_color[1] = 0.0f;
3257  r_color[2] = 0.0f;
3258  r_color[3] = 1.0f;
3259 }
3260 
3262 {
3263  /* Fallback types for undefined tree, nodes, sockets
3264  * Defined in blenkernel, but not registered in type hashes.
3265  */
3266 
3267  /* default ui functions */
3275 
3280 
3281  /* node type ui functions */
3282  NODE_TYPES_BEGIN (ntype) {
3283  /* default ui functions */
3284  ntype->draw_nodetype = node_draw_default;
3285  ntype->draw_nodetype_prepare = node_update_default;
3286  ntype->select_area_func = node_select_area_default;
3287  ntype->tweak_area_func = node_tweak_area_default;
3288  ntype->resize_area_func = node_resize_area_default;
3289 
3290  node_common_set_butfunc(ntype);
3291 
3293  node_shader_set_butfunc(ntype);
3294  node_texture_set_butfunc(ntype);
3295 
3296  /* define update callbacks for socket properties */
3298  }
3300 
3301  /* tree type icons */
3302  ntreeType_Composite->ui_icon = ICON_NODE_COMPOSITING;
3303  ntreeType_Shader->ui_icon = ICON_NODE_MATERIAL;
3304  ntreeType_Texture->ui_icon = ICON_NODE_TEXTURE;
3305  ntreeType_Geometry->ui_icon = ICON_NODETREE;
3306 }
3307 
3309 {
3310  /* default ui functions */
3316 }
3317 
3319 {
3320  /* default ui functions */
3321  stype->draw = node_socket_button_label;
3322 }
3323 
3324 static const float virtual_node_socket_color[4] = {0.2, 0.2, 0.2, 1.0};
3325 
3326 /* maps standard socket integer type to a color */
3327 static const float std_node_socket_colors[][4] = {
3328  {0.63, 0.63, 0.63, 1.0}, /* SOCK_FLOAT */
3329  {0.39, 0.39, 0.78, 1.0}, /* SOCK_VECTOR */
3330  {0.78, 0.78, 0.16, 1.0}, /* SOCK_RGBA */
3331  {0.39, 0.78, 0.39, 1.0}, /* SOCK_SHADER */
3332  {0.80, 0.65, 0.84, 1.0}, /* SOCK_BOOLEAN */
3333  {0.0, 0.0, 0.0, 1.0}, /*__SOCK_MESH (deprecated) */
3334  {0.25, 0.75, 0.26, 1.0}, /* SOCK_INT */
3335  {0.44, 0.70, 1.00, 1.0}, /* SOCK_STRING */
3336  {0.93, 0.62, 0.36, 1.0}, /* SOCK_OBJECT */
3337  {0.89, 0.76, 0.43, 1.0}, /* SOCK_IMAGE */
3338  {0.00, 0.84, 0.64, 1.0}, /* SOCK_GEOMETRY */
3339  {0.96, 0.96, 0.96, 1.0}, /* SOCK_COLLECTION */
3340 };
3341 
3342 /* common color callbacks for standard types */
3344  PointerRNA *ptr,
3345  PointerRNA *UNUSED(node_ptr),
3346  float *r_color)
3347 {
3348  bNodeSocket *sock = ptr->data;
3349  int type = sock->typeinfo->type;
3351 }
3353  PointerRNA *ptr,
3354  float *r_color)
3355 {
3356  bNodeSocket *sock = ptr->data;
3357  int type = sock->typeinfo->type;
3359 }
3360 
3361 /* draw function for file output node sockets,
3362  * displays only sub-path and format, no value button */
3364  uiLayout *layout,
3365  PointerRNA *ptr,
3366  PointerRNA *node_ptr)
3367 {
3369  bNodeSocket *sock = ptr->data;
3370  uiLayout *row;
3371  PointerRNA inputptr;
3372 
3373  row = uiLayoutRow(layout, false);
3374 
3375  PointerRNA imfptr = RNA_pointer_get(node_ptr, "format");
3376  int imtype = RNA_enum_get(&imfptr, "file_format");
3377 
3378  if (imtype == R_IMF_IMTYPE_MULTILAYER) {
3379  NodeImageMultiFileSocket *input = sock->storage;
3380  RNA_pointer_create(&ntree->id, &RNA_NodeOutputFileSlotLayer, input, &inputptr);
3381 
3382  uiItemL(row, input->layer, ICON_NONE);
3383  }
3384  else {
3385  NodeImageMultiFileSocket *input = sock->storage;
3386  uiBlock *block;
3387  RNA_pointer_create(&ntree->id, &RNA_NodeOutputFileSlotFile, input, &inputptr);
3388 
3389  uiItemL(row, input->path, ICON_NONE);
3390 
3391  if (!RNA_boolean_get(&inputptr, "use_node_format")) {
3392  imfptr = RNA_pointer_get(&inputptr, "format");
3393  }
3394 
3395  const char *imtype_name;
3396  PropertyRNA *imtype_prop = RNA_struct_find_property(&imfptr, "file_format");
3398  &imfptr,
3399  imtype_prop,
3400  RNA_property_enum_get(&imfptr, imtype_prop),
3401  &imtype_name);
3402  block = uiLayoutGetBlock(row);
3404  uiItemL(row, imtype_name, ICON_NONE);
3406  }
3407 }
3408 
3410  bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, const char *text)
3411 {
3412  bNode *node = node_ptr->data;
3413  bNodeSocket *sock = ptr->data;
3414  int type = sock->typeinfo->type;
3415  /*int subtype = sock->typeinfo->subtype;*/
3416 
3417  /* XXX not nice, eventually give this node its own socket type ... */
3418  if (node->type == CMP_NODE_OUTPUT_FILE) {
3419  node_file_output_socket_draw(C, layout, ptr, node_ptr);
3420  return;
3421  }
3422 
3423  if ((sock->in_out == SOCK_OUT) || (sock->flag & SOCK_IN_USE) || (sock->flag & SOCK_HIDE_VALUE)) {
3424  node_socket_button_label(C, layout, ptr, node_ptr, text);
3425  return;
3426  }
3427 
3428  switch (type) {
3429  case SOCK_FLOAT:
3430  case SOCK_INT:
3431  case SOCK_BOOLEAN:
3432  uiItemR(layout, ptr, "default_value", DEFAULT_FLAGS, text, 0);
3433  break;
3434  case SOCK_VECTOR:
3435  if (sock->flag & SOCK_COMPACT) {
3436  uiTemplateComponentMenu(layout, ptr, "default_value", text);
3437  }
3438  else {
3439  if (sock->typeinfo->subtype == PROP_DIRECTION) {
3440  uiItemR(layout, ptr, "default_value", DEFAULT_FLAGS, "", ICON_NONE);
3441  }
3442  else {
3443  uiLayout *column = uiLayoutColumn(layout, true);
3444  uiItemR(column, ptr, "default_value", DEFAULT_FLAGS, text, ICON_NONE);
3445  }
3446  }
3447  break;
3448  case SOCK_RGBA: {
3449  uiLayout *row = uiLayoutSplit(layout, 0.4f, false);
3450  uiItemL(row, text, 0);
3451  uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0);
3452  break;
3453  }
3454  case SOCK_STRING: {
3455  uiLayout *row = uiLayoutSplit(layout, 0.4f, false);
3456  uiItemL(row, text, 0);
3457 
3458  const bNodeTree *node_tree = (const bNodeTree *)node_ptr->owner_id;
3459  if (node_tree->type == NTREE_GEOMETRY) {
3461  }
3462  else {
3463  uiItemR(row, ptr, "default_value", DEFAULT_FLAGS, "", 0);
3464  }
3465 
3466  break;
3467  }
3468  case SOCK_OBJECT: {
3469  uiItemR(layout, ptr, "default_value", DEFAULT_FLAGS, text, 0);
3470  break;
3471  }
3472  case SOCK_IMAGE: {
3473  uiItemR(layout, ptr, "default_value", DEFAULT_FLAGS, text, 0);
3474  break;
3475  }
3476  case SOCK_COLLECTION: {
3477  uiItemR(layout, ptr, "default_value", DEFAULT_FLAGS, text, 0);
3478  break;
3479  }
3480  default:
3481  node_socket_button_label(C, layout, ptr, node_ptr, text);
3482  break;
3483  }
3484 }
3485 
3487 {
3488  bNodeSocket *sock = ptr->data;
3489  int type = sock->typeinfo->type;
3490 
3491  uiLayout *col = uiLayoutColumn(layout, false);
3492 
3493  switch (type) {
3494  case SOCK_FLOAT: {
3495  uiItemR(col, ptr, "default_value", DEFAULT_FLAGS, IFACE_("Default"), ICON_NONE);
3496  uiLayout *sub = uiLayoutColumn(col, true);
3497  uiItemR(sub, ptr, "min_value", DEFAULT_FLAGS, IFACE_("Min"), ICON_NONE);
3498  uiItemR(sub, ptr, "max_value", DEFAULT_FLAGS, IFACE_("Max"), ICON_NONE);
3499  break;
3500  }
3501  case SOCK_INT: {
3502  uiItemR(col, ptr, "default_value", DEFAULT_FLAGS, IFACE_("Default"), ICON_NONE);
3503  uiLayout *sub = uiLayoutColumn(col, true);
3504  uiItemR(sub, ptr, "min_value", DEFAULT_FLAGS, IFACE_("Min"), ICON_NONE);
3505  uiItemR(sub, ptr, "max_value", DEFAULT_FLAGS, IFACE_("Max"), ICON_NONE);
3506  break;
3507  }
3508  case SOCK_VECTOR: {
3509  uiItemR(col, ptr, "default_value", UI_ITEM_R_EXPAND, IFACE_("Default"), ICON_NONE);
3510  uiLayout *sub = uiLayoutColumn(col, true);
3511  uiItemR(sub, ptr, "min_value", DEFAULT_FLAGS, IFACE_("Min"), ICON_NONE);
3512  uiItemR(sub, ptr, "max_value", DEFAULT_FLAGS, IFACE_("Max"), ICON_NONE);
3513  break;
3514  }
3515  case SOCK_BOOLEAN:
3516  case SOCK_RGBA:
3517  case SOCK_STRING: {
3518  uiItemR(col, ptr, "default_value", DEFAULT_FLAGS, IFACE_("Default"), 0);
3519  break;
3520  }
3521  }
3522 
3523  uiItemR(layout, ptr, "hide_value", DEFAULT_FLAGS, NULL, 0);
3524 }
3525 
3527 {
3528  stype->draw = std_node_socket_draw;
3532 }
3533 
3535  PointerRNA *UNUSED(ptr),
3536  PointerRNA *UNUSED(node_ptr),
3537  float *r_color)
3538 {
3540 }
3541 
3543 {
3544  stype->draw = node_socket_button_label;
3546 }
3547 
3548 /* ************** Generic drawing ************** */
3549 
3551  ARegion *region,
3552  SpaceNode *snode,
3553  bNodeInstanceKey parent_key)
3554 {
3555  Main *bmain = CTX_data_main(C);
3556  bNodeInstanceKey active_viewer_key = (snode->nodetree ? snode->nodetree->active_viewer_key :
3559  GPU_matrix_push();
3564  GPU_matrix_pop();
3565 
3566  if (!(snode->flag & SNODE_BACKDRAW) || !ED_node_is_compositor(snode)) {
3567  return;
3568  }
3569 
3570  if (parent_key.value != active_viewer_key.value) {
3571  return;
3572  }
3573 
3575  GPU_matrix_push();
3576 
3577  /* The draw manager is used to draw the backdrop image. */
3581  DRW_draw_view(C);
3584  /* Draw manager changes the depth state. Set it back to NONE. Without this the node preview
3585  * images aren't drawn correctly. */
3587 
3588  void *lock;
3589  Image *ima = BKE_image_ensure_viewer(bmain, IMA_TYPE_COMPOSITE, "Viewer Node");
3590  ImBuf *ibuf = BKE_image_acquire_ibuf(ima, NULL, &lock);
3591  if (ibuf) {
3592  /* somehow the offset has to be calculated inverse */
3594  const float x = (region->winx - snode->zoom * ibuf->x) / 2 + snode->xof;
3595  const float y = (region->winy - snode->zoom * ibuf->y) / 2 + snode->yof;
3596 
3598  if (snode->edittree) {
3599  bNode *node = snode->edittree->nodes.first;
3600  rctf *viewer_border = &snode->nodetree->viewer_border;
3601  while (node) {
3602  if (node->flag & NODE_SELECT) {
3603  if (node->typeinfo->draw_backdrop) {
3604  node->typeinfo->draw_backdrop(snode, ibuf, node, x, y);
3605  }
3606  }
3607  node = node->next;
3608  }
3609 
3610  if ((snode->nodetree->flag & NTREE_VIEWER_BORDER) &&
3611  viewer_border->xmin < viewer_border->xmax && viewer_border->ymin < viewer_border->ymax) {
3612  rcti pixel_border;
3613  BLI_rcti_init(&pixel_border,
3614  x + snode->zoom * viewer_border->xmin * ibuf->x,
3615  x + snode->zoom * viewer_border->xmax * ibuf->x,
3616  y + snode->zoom * viewer_border->ymin * ibuf->y,
3617  y + snode->zoom * viewer_border->ymax * ibuf->y);
3618 
3623 
3624  immDrawBorderCorners(pos, &pixel_border, 1.0f, 1.0f);
3625 
3626  immUnbindProgram();
3627  }
3628  }
3629  }
3630 
3631  BKE_image_release_ibuf(ima, ibuf, lock);
3633  GPU_matrix_pop();
3634 }
3635 
3636 /* return quadratic beziers points for a given nodelink and clip if v2d is not NULL. */
3638  const SpaceNode *snode,
3639  const bNodeLink *link,
3640  float vec[4][2])
3641 {
3642  float cursor[2] = {0.0f, 0.0f};
3643 
3644  /* this function can be called with snode null (via cut_links_intersect) */
3645  /* XXX map snode->runtime->cursor back to view space */
3646  if (snode) {
3647  cursor[0] = snode->runtime->cursor[0] * UI_DPI_FAC;
3648  cursor[1] = snode->runtime->cursor[1] * UI_DPI_FAC;
3649  }
3650 
3651  /* in v0 and v3 we put begin/end points */
3652  int toreroute, fromreroute;
3653  if (link->fromsock) {
3654  vec[0][0] = link->fromsock->locx;
3655  vec[0][1] = link->fromsock->locy;
3656  if (link->fromsock->flag & SOCK_MULTI_INPUT) {
3658  link->fromsock->locy,
3659  link->fromsock->total_inputs - 1,
3660  link->fromsock->total_inputs,
3661  vec[0]);
3662  }
3663  fromreroute = (link->fromnode && link->fromnode->type == NODE_REROUTE);
3664  }
3665  else {
3666  if (snode == NULL) {
3667  return false;
3668  }
3669  copy_v2_v2(vec[0], cursor);
3670  fromreroute = 0;
3671  }
3672  if (link->tosock) {
3673  vec[3][0] = link->tosock->locx;
3674  vec[3][1] = link->tosock->locy;
3675  if (!(link->tonode->flag & NODE_HIDDEN) && link->tosock->flag & SOCK_MULTI_INPUT) {
3677  link->tosock->locy,
3679  link->tosock->total_inputs,
3680  vec[3]);
3681  }
3682  toreroute = (link->tonode && link->tonode->type == NODE_REROUTE);
3683  }
3684  else {
3685  if (snode == NULL) {
3686  return false;
3687  }
3688  copy_v2_v2(vec[3], cursor);
3689  toreroute = 0;
3690  }
3691 
3692  /* may be called outside of drawing (so pass spacetype) */
3694 
3695  if (curving == 0) {
3696  /* Straight line: align all points. */
3697  mid_v2_v2v2(vec[1], vec[0], vec[3]);
3698  mid_v2_v2v2(vec[2], vec[1], vec[3]);
3699  return true;
3700  }
3701 
3702  const float dist = curving * 0.10f * fabsf(vec[0][0] - vec[3][0]);
3703  const float deltax = vec[3][0] - vec[0][0];
3704  const float deltay = vec[3][1] - vec[0][1];
3705  /* check direction later, for top sockets */
3706  if (fromreroute) {
3707  if (fabsf(deltax) > fabsf(deltay)) {
3708  vec[1][1] = vec[0][1];
3709  vec[1][0] = vec[0][0] + (deltax > 0 ? dist : -dist);
3710  }
3711  else {
3712  vec[1][0] = vec[0][0];
3713  vec[1][1] = vec[0][1] + (deltay > 0 ? dist : -dist);
3714  }
3715  }
3716  else {
3717  vec[1][0] = vec[0][0] + dist;
3718  vec[1][1] = vec[0][1];
3719  }
3720  if (toreroute) {
3721  if (fabsf(deltax) > fabsf(deltay)) {
3722  vec[2][1] = vec[3][1];
3723  vec[2][0] = vec[3][0] + (deltax > 0 ? -dist : dist);
3724  }
3725  else {
3726  vec[2][0] = vec[3][0];
3727  vec[2][1] = vec[3][1] + (deltay > 0 ? -dist : dist);
3728  }
3729  }
3730  else {
3731  vec[2][0] = vec[3][0] - dist;
3732  vec[2][1] = vec[3][1];
3733  }
3734 
3735  if (v2d && min_ffff(vec[0][0], vec[1][0], vec[2][0], vec[3][0]) > v2d->cur.xmax) {
3736  return false; /* clipped */
3737  }
3738  if (v2d && max_ffff(vec[0][0], vec[1][0], vec[2][0], vec[3][0]) < v2d->cur.xmin) {
3739  return false; /* clipped */
3740  }
3741 
3742  return true;
3743 }
3744 
3745 /* if v2d not NULL, it clips and returns 0 if not visible */
3747  const SpaceNode *snode,
3748  const bNodeLink *link,
3749  float coord_array[][2],
3750  const int resol)
3751 {
3752  float vec[4][2];
3753 
3754  if (node_link_bezier_handles(v2d, snode, link, vec)) {
3755  /* always do all three, to prevent data hanging around */
3757  vec[0][0], vec[1][0], vec[2][0], vec[3][0], coord_array[0] + 0, resol, sizeof(float[2]));
3759  vec[0][1], vec[1][1], vec[2][1], vec[3][1], coord_array[0] + 1, resol, sizeof(float[2]));
3760 
3761  return true;
3762  }
3763  return false;
3764 }
3765 
3766 #define NODELINK_GROUP_SIZE 256
3767 #define LINK_RESOL 24
3768 #define LINK_WIDTH (2.5f * UI_DPI_FAC)
3769 #define ARROW_SIZE (7 * UI_DPI_FAC)
3770 
3771 /* Reroute arrow shape and mute bar. These are expanded here and shrunk in the glsl code.
3772  * See: gpu_shader_2D_nodelink_vert.glsl */
3773 static float arrow_verts[3][2] = {{-1.0f, 1.0f}, {0.0f, 0.0f}, {-1.0f, -1.0f}};
3774 static float arrow_expand_axis[3][2] = {{0.7071f, 0.7071f}, {M_SQRT2, 0.0f}, {0.7071f, -0.7071f}};
3775 static float mute_verts[3][2] = {{0.7071f, 1.0f}, {0.7071f, 0.0f}, {0.7071f, -1.0f}};
3776 static float mute_expand_axis[3][2] = {{1.0f, 0.0f}, {1.0f, 0.0f}, {1.0f, -0.0f}};
3777 
3778 static struct {
3779  GPUBatch *batch; /* for batching line together */
3780  GPUBatch *batch_single; /* for single line */
3787  bool enabled;
3789 
3790 static void nodelink_batch_reset(void)
3791 {
3797  g_batch_link.inst_vbo, g_batch_link.colid_id, &g_batch_link.colid_step);
3799  g_batch_link.inst_vbo, g_batch_link.muted_id, &g_batch_link.muted_step);
3800  g_batch_link.count = 0;
3801 }
3802 
3804  uint uv_id,
3805  uint pos_id,
3806  uint exp_id,
3807  uint v,
3808  const uchar uv[2],
3809  const float pos[2],
3810  const float exp[2])
3811 {
3812  GPU_vertbuf_attr_set(vbo, uv_id, v, uv);
3813  GPU_vertbuf_attr_set(vbo, pos_id, v, pos);
3814  GPU_vertbuf_attr_set(vbo, exp_id, v, exp);
3815 }
3816 
3817 static void nodelink_batch_init(void)
3818 {
3819  GPUVertFormat format = {0};
3824  int vcount = LINK_RESOL * 2; /* curve */
3825  vcount += 2; /* restart strip */
3826  vcount += 3 * 2; /* arrow */
3827  vcount += 2; /* restart strip */
3828  vcount += 3 * 2; /* mute */
3829  vcount *= 2; /* shadow */
3830  vcount += 2; /* restart strip */
3831  GPU_vertbuf_data_alloc(vbo, vcount);
3832  int v = 0;
3833 
3834  for (int k = 0; k < 2; k++) {
3835  uchar uv[2] = {0, 0};
3836  float pos[2] = {0.0f, 0.0f};
3837  float exp[2] = {0.0f, 1.0f};
3838 
3839  /* restart */
3840  if (k == 1) {
3841  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3842  }
3843 
3844  /* curve strip */
3845  for (int i = 0; i < LINK_RESOL; i++) {
3846  uv[0] = 255 * (i / (float)(LINK_RESOL - 1));
3847  uv[1] = 0;
3848  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3849  uv[1] = 255;
3850  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3851  }
3852  /* restart */
3853  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3854 
3855  uv[0] = 127;
3856  uv[1] = 0;
3857  copy_v2_v2(pos, arrow_verts[0]);
3859  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3860  /* arrow */
3861  for (int i = 0; i < 3; i++) {
3862  uv[1] = 0;
3863  copy_v2_v2(pos, arrow_verts[i]);
3865  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3866 
3867  uv[1] = 255;
3868  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3869  }
3870 
3871  /* restart */
3872  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3873 
3874  uv[0] = 127;
3875  uv[1] = 0;
3876  copy_v2_v2(pos, mute_verts[0]);
3878  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3879  /* bar */
3880  for (int i = 0; i < 3; ++i) {
3881  uv[1] = 0;
3882  copy_v2_v2(pos, mute_verts[i]);
3884  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3885 
3886  uv[1] = 255;
3887  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3888  }
3889 
3890  /* restart */
3891  if (k == 0) {
3892  set_nodelink_vertex(vbo, uv_id, pos_id, expand_id, v++, uv, pos, exp);
3893  }
3894  }
3895 
3898 
3899  g_batch_link.batch_single = GPU_batch_create_ex(GPU_PRIM_TRI_STRIP, vbo, NULL, 0);
3901 
3902  /* Instances data */
3903  GPUVertFormat format_inst = {0};
3905  &format_inst, "P0", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
3907  &format_inst, "P1", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
3909  &format_inst, "P2", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
3911  &format_inst, "P3", GPU_COMP_F32, 2, GPU_FETCH_FLOAT);
3913  &format_inst, "colid_doarrow", GPU_COMP_U8, 4, GPU_FETCH_INT);
3915  &format_inst, "domuted", GPU_COMP_U8, 2, GPU_FETCH_INT);
3917  /* Alloc max count but only draw the range we need. */
3919 
3920  GPU_batch_instbuf_set(g_batch_link.batch, g_batch_link.inst_vbo, true);
3921 
3923 }
3924 
3925 static char nodelink_get_color_id(int th_col)
3926 {
3927  switch (th_col) {
3928  case TH_WIRE:
3929  return 1;
3930  case TH_WIRE_INNER:
3931  return 2;
3932  case TH_ACTIVE:
3933  return 3;
3934  case TH_EDGE_SELECT:
3935  return 4;
3936  case TH_REDALERT:
3937  return 5;
3938  }
3939  return 0;
3940 }
3941 
3942 static void nodelink_batch_draw(const SpaceNode *snode)
3943 {
3944  if (g_batch_link.count == 0) {
3945  return;
3946  }
3947 
3949 
3950  float colors[6][4] = {{0.0f}};
3956 
3958  GPU_vertbuf_use(g_batch_link.inst_vbo); /* force update. */
3959 
3961  GPU_batch_uniform_4fv_array(g_batch_link.batch, "colors", 6, colors);
3962  GPU_batch_uniform_1f(g_batch_link.batch, "expandSize", snode->runtime->aspect * LINK_WIDTH);
3963  GPU_batch_uniform_1f(g_batch_link.batch, "arrowSize", ARROW_SIZE);
3965 
3967 
3969 }
3970 
3972 {
3973  g_batch_link.enabled = true;
3974 }
3975 
3977 {
3978  nodelink_batch_draw(snode);
3979  g_batch_link.enabled = false;
3980 }
3981 
3982 static void nodelink_batch_add_link(const SpaceNode *snode,
3983  const float p0[2],
3984  const float p1[2],
3985  const float p2[2],
3986  const float p3[2],
3987  int th_col1,
3988  int th_col2,
3989  int th_col3,
3990  bool drawarrow,
3991  bool drawmuted)
3992 {
3993  /* Only allow these colors. If more is needed, you need to modify the shader accordingly. */
3996  BLI_assert(ELEM(th_col3, TH_WIRE, TH_REDALERT, -1));
3997 
3998  g_batch_link.count++;
4003  char *colid = GPU_vertbuf_raw_step(&g_batch_link.colid_step);
4004  colid[0] = nodelink_get_color_id(th_col1);
4005  colid[1] = nodelink_get_color_id(th_col2);
4006  colid[2] = nodelink_get_color_id(th_col3);
4007  colid[3] = drawarrow;
4008  char *muted = GPU_vertbuf_raw_step(&g_batch_link.muted_step);
4009  muted[0] = drawmuted;
4010 
4011  if (g_batch_link.count == NODELINK_GROUP_SIZE) {
4012  nodelink_batch_draw(snode);
4013  }
4014 }
4015 
4016 /* don't do shadows if th_col3 is -1. */
4018  const SpaceNode *snode,
4019  const bNodeLink *link,
4020  int th_col1,
4021  int th_col2,
4022  int th_col3)
4023 {
4024  float vec[4][2];
4025  const bool highlighted = link->flag & NODE_LINK_TEMP_HIGHLIGHT;
4026  if (node_link_bezier_handles(v2d, snode, link, vec)) {
4027  int drawarrow = ((link->tonode && (link->tonode->type == NODE_REROUTE)) &&
4028  (link->fromnode && (link->fromnode->type == NODE_REROUTE)));
4029  int drawmuted = (link->flag & NODE_LINK_MUTED);
4030  if (g_batch_link.batch == NULL) {
4032  }
4033 
4034  if (g_batch_link.enabled && !highlighted) {
4035  /* Add link to batch. */
4037  snode, vec[0], vec[1], vec[2], vec[3], th_col1, th_col2, th_col3, drawarrow, drawmuted);
4038  }
4039  else {
4040  /* Draw single link. */
4041  float colors[3][4] = {{0.0f}};
4042  if (th_col3 != -1) {
4043  UI_GetThemeColor4fv(th_col3, colors[0]);
4044  }
4045  UI_GetThemeColor4fv(th_col1, colors[1]);
4046  UI_GetThemeColor4fv(th_col2, colors[2]);
4047 
4048  if (highlighted) {
4049  float link_preselection_highlight_color[4];
4050  UI_GetThemeColor4fv(TH_SELECT, link_preselection_highlight_color);
4051  copy_v4_v4(colors[2], link_preselection_highlight_color);
4052  }
4053 
4054  GPUBatch *batch = g_batch_link.batch_single;
4056  GPU_batch_uniform_2fv_array(batch, "bezierPts", 4, vec);
4057  GPU_batch_uniform_4fv_array(batch, "colors", 3, colors);
4058  GPU_batch_uniform_1f(batch, "expandSize", snode->runtime->aspect * LINK_WIDTH);
4059  GPU_batch_uniform_1f(batch, "arrowSize", ARROW_SIZE);
4060  GPU_batch_uniform_1i(batch, "doArrow", drawarrow);
4061  GPU_batch_uniform_1i(batch, "doMuted", drawmuted);
4063  }
4064  }
4065 }
4066 
4067 /* note; this is used for fake links in groups too */
4068 void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
4069 {
4070  int th_col1 = TH_WIRE_INNER, th_col2 = TH_WIRE_INNER, th_col3 = TH_WIRE;
4071 
4072  if (link->fromsock == NULL && link->tosock == NULL) {
4073  return;
4074  }
4075 
4076  /* new connection */
4077  if (!link->fromsock || !link->tosock) {
4078  th_col1 = th_col2 = TH_ACTIVE;
4079  }
4080  else {
4081  /* going to give issues once... */
4082  if (link->tosock->flag & SOCK_UNAVAIL) {
4083  return;
4084  }
4085  if (link->fromsock->flag & SOCK_UNAVAIL) {
4086  return;
4087  }
4088 
4089  if (link->flag & NODE_LINK_VALID) {
4090  /* special indicated link, on drop-node */
4091  if (link->flag & NODE_LINKFLAG_HILITE) {
4092  th_col1 = th_col2 = TH_ACTIVE;
4093  }
4094  else if (link->flag & NODE_LINK_MUTED) {
4095  th_col1 = th_col2 = TH_REDALERT;
4096  }
4097  else {
4098  /* Regular link, highlight if connected to selected node. */
4099  if (link->fromnode && link->fromnode->flag & SELECT) {
4100  th_col1 = TH_EDGE_SELECT;
4101  }
4102  if (link->tonode && link->tonode->flag & SELECT) {
4103  th_col2 = TH_EDGE_SELECT;
4104  }
4105  }
4106  }
4107  else {
4108  /* Invalid link. */
4109  th_col1 = th_col2 = th_col3 = TH_REDALERT;
4110  // th_col3 = -1; /* no shadow */
4111  }
4112  }
4113 
4114  node_draw_link_bezier(v2d, snode, link, th_col1, th_col2, th_col3);
4115 }
4116 
4117 void ED_node_draw_snap(View2D *v2d, const float cent[2], float size, NodeBorder border, uint pos)
4118 {
4120 
4121  if (border & (NODE_LEFT | NODE_RIGHT)) {
4122  immVertex2f(pos, cent[0], v2d->cur.ymin);
4123  immVertex2f(pos, cent[0], v2d->cur.ymax);
4124  }
4125  else {
4126  immVertex2f(pos, cent[0], cent[1] - size);
4127  immVertex2f(pos, cent[0], cent[1] + size);
4128  }
4129 
4130  if (border & (NODE_TOP | NODE_BOTTOM)) {
4131  immVertex2f(pos, v2d->cur.xmin, cent[1]);
4132  immVertex2f(pos, v2d->cur.xmax, cent[1]);
4133  }
4134  else {
4135  immVertex2f(pos, cent[0] - size, cent[1]);
4136  immVertex2f(pos, cent[0] + size, cent[1]);
4137  }
4138 
4139  immEnd();
4140 }
typedef float(TangentPoint)[2]
void immDrawBorderCorners(unsigned int pos, const struct rcti *border, float zoomx, float zoomy)
struct Scene * CTX_data_scene(const bContext *C)
Definition: context.c:1034
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
Definition: context.c:445
struct Main * CTX_data_main(const bContext *C)
Definition: context.c:1018
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
Definition: curve.c:1804
void BKE_image_release_ibuf(struct Image *ima, struct ImBuf *ibuf, void *lock)
Definition: image.c:5113
struct ImBuf * BKE_image_acquire_ibuf(struct Image *ima, struct ImageUser *iuser, void **r_lock)
Definition: image.c:5100
struct Image * BKE_image_ensure_viewer(struct Main *bmain, int type, const char *name)
Definition: image.c:3162
int BKE_image_user_frame_get(const struct ImageUser *iuser, int cfra, bool *r_is_in_range)
bool BKE_image_is_dirty(struct Image *image)
Definition: image.c:5681
#define NODE_TYPES_BEGIN(ntype)
Definition: BKE_node.h:535
#define SH_NODE_TEX_GRADIENT
Definition: BKE_node.h:1014
#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
#define NODE_REROUTE
Definition: BKE_node.h:873
#define SH_NODE_TEX_MAGIC
Definition: BKE_node.h:1016
#define CMP_TRACKPOS_ABSOLUTE_FRAME
Definition: BKE_node.h:1256
#define SH_NODE_OUTPUT_WORLD
Definition: BKE_node.h:996
#define SH_NODE_UVMAP
Definition: BKE_node.h:1052
#define CMP_NODE_KEYINGSCREEN
Definition: BKE_node.h:1201
#define TEX_NODE_PROC_MAX
Definition: BKE_node.h:1351
#define SH_NODE_BSDF_PRINCIPLED
Definition: BKE_node.h:1058
#define SH_NODE_VECTOR_ROTATE
Definition: BKE_node.h:1073
#define CMP_NODE_BILATERALBLUR
Definition: BKE_node.h:1186
#define CMP_NODE_TRANSLATE
Definition: BKE_node.h:1156
#define CMP_TRACKPOS_RELATIVE_FRAME
Definition: BKE_node.h:1255
struct bNodeType NodeTypeUndefined
Definition: node.cc:98
#define SH_NODE_SUBSURFACE_SCATTERING
Definition: BKE_node.h:1042
#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 SH_NODE_MAP_RANGE
Definition: BKE_node.h:1067
#define SH_NODE_UVALONGSTROKE
Definition: BKE_node.h:1056
#define CMP_NODE_BOKEHIMAGE
Definition: BKE_node.h:1216
#define NODE_RESIZE_TOP
Definition: BKE_node.h:364
#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 SH_NODE_TEX_ENVIRONMENT
Definition: BKE_node.h:1022
#define SH_NODE_NORMAL_MAP
Definition: BKE_node.h:1040
#define SH_NODE_VALUE
Definition: BKE_node.h:973
#define CMP_NODE_ALPHAOVER
Definition: BKE_node.h:1141
#define SH_NODE_MATH
Definition: BKE_node.h:985
#define SH_NODE_TEX_IES
Definition: BKE_node.h:1059
#define CMP_NODE_CROP
Definition: BKE_node.h:1184
#define TEX_NODE_TEXTURE
Definition: BKE_node.h:1327
#define CMP_SCALE_RENDERPERCENT
Definition: BKE_node.h:1247
#define CMP_NODE_CHROMA_MATTE
Definition: BKE_node.h:1168
#define CMP_NODE_GLARE
Definition: BKE_node.h:1208
#define SH_NODE_WIREFRAME
Definition: BKE_node.h:1043
#define CMP_NODE_PLANETRACKDEFORM
Definition: BKE_node.h:1222
#define CMP_NODE_MOVIECLIP
Definition: BKE_node.h:1193
void nodeLabel(struct bNodeTree *ntree, struct bNode *node, char *label, int maxlen)
Definition: node.cc:4391
#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 TEX_NODE_IMAGE
Definition: BKE_node.h:1333
#define CMP_NODE_OUTPUT_FILE
Definition: BKE_node.h:1154
#define CMP_NODE_COLORCORRECTION
Definition: BKE_node.h:1213
#define SH_NODE_BSDF_HAIR
Definition: BKE_node.h:1050
#define CMP_NODE_DOUBLEEDGEMASK
Definition: BKE_node.h:1197
#define SH_NODE_BSDF_ANISOTROPIC
Definition: BKE_node.h:1002
#define CMP_NODE_STABILIZE2D
Definition: BKE_node.h:1194
#define SH_NODE_MAPPING
Definition: BKE_node.h:981
#define SH_NODE_VALTORGB
Definition: BKE_node.h:975
#define SH_NODE_TEX_POINTDENSITY
Definition: BKE_node.h:1057
#define CMP_NODE_SWITCH
Definition: BKE_node.h:1218
#define SH_NODE_CURVE_RGB
Definition: BKE_node.h:983
#define CMP_NODE_RGB
Definition: BKE_node.h:1133
#define NODE_RESIZE_BOTTOM
Definition: BKE_node.h:365
#define CMP_NODE_MASK_BOX
Definition: BKE_node.h:1214
#define TEX_NODE_OUTPUT
Definition: BKE_node.h:1325
#define TEX_NODE_CURVE_TIME
Definition: BKE_node.h:1337
#define CMP_CRYPTOMATTE_SRC_RENDER
Definition: BKE_node.h:1259
#define SH_NODE_BSDF_GLASS
Definition: BKE_node.h:1005
struct bNodeSocketType NodeSocketTypeUndefined
Definition: node.cc:99
const bNodeInstanceKey NODE_INSTANCE_KEY_NONE
Definition: node.cc:3909
#define NODE_FRAME
Definition: BKE_node.h:872
#define CMP_NODE_R_LAYERS
Definition: BKE_node.h:1152
#define CMP_NODE_CURVE_VEC
Definition: BKE_node.h:1139
#define SH_NODE_DISPLACEMENT
Definition: BKE_node.h:1062
#define CMP_NODE_INVERT
Definition: BKE_node.h:1182
#define TEX_NODE_MATH
Definition: BKE_node.h:1329
#define CMP_NODE_COLOR_MATTE
Definition: BKE_node.h:1190
#define NODE_TYPES_END
Definition: BKE_node.h:542
#define CMP_NODE_SUNBEAMS
Definition: BKE_node.h:1211
#define TEX_NODE_PROC
Definition: BKE_node.h:1350
#define NODE_RESIZE_RIGHT
Definition: BKE_node.h:366
#define SH_NODE_OUTPUT_AOV
Definition: BKE_node.h:1072
#define NODE_RESIZE_LEFT
Definition: BKE_node.h:367
#define SH_NODE_SCRIPT
Definition: BKE_node.h:1036
#define CMP_NODE_BRIGHTCONTRAST
Definition: BKE_node.h:1180
#define CMP_NODE_FLIP
Definition: BKE_node.h:1170
#define SH_NODE_TEX_MUSGRAVE
Definition: BKE_node.h:1019
#define SH_NODE_ATTRIBUTE
Definition: BKE_node.h:1000
struct MovieTrackingObject * BKE_tracking_object_get_named(struct MovieTracking *tracking, const char *name)
Definition: tracking.c:2183
void BLF_aspect(int fontid, float x, float y, float z)
Definition: blf.c:292
#define BLF_CLIPPING
Definition: BLF_api.h:270
void BLF_color3ubv(int fontid, const unsigned char rgb[3])
Definition: blf.c:411
float BLF_width(int fontid, const char *str, size_t len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
Definition: blf.c:723
#define BLF_ASPECT
Definition: BLF_api.h:274
void BLF_draw(int fontid, const char *str, size_t len) ATTR_NONNULL(2)
Definition: blf.c:542
#define BLF_DRAW_STR_DUMMY_MAX
Definition: BLF_api.h:283
void BLF_disable(int fontid, int option)
Definition: blf.c:283
float BLF_ascender(int fontid) ATTR_WARN_UNUSED_RESULT
Definition: blf.c:790
void BLF_draw_ex(int fontid, const char *str, size_t len, struct ResultBLF *r_info) ATTR_NONNULL(2)
Definition: blf.c:525
void BLF_size(int fontid, int size, int dpi)
Definition: blf.c:367
void BLF_enable(int fontid, int option)
Definition: blf.c:274
int BLF_height_max(int fontid) ATTR_WARN_UNUSED_RESULT
Definition: blf.c:757
#define BLF_WORD_WRAP
Definition: BLF_api.h:275
void BLF_clipping(int fontid, float xmin, float ymin, float xmax, float ymax)
Definition: blf.c:810
void BLF_wordwrap(int fontid, int wrap_width)
Definition: blf.c:822
void BLF_position(int fontid, float x, float y, float z)
Definition: blf.c:312
#define BLI_assert(a)
Definition: BLI_assert.h:58
#define LISTBASE_FOREACH(type, var, list)
Definition: BLI_listbase.h:172
MINLINE float max_ffff(float a, float b, float c, float d)
MINLINE float min_ffff(float a, float b, float c, float d)
#define M_SQRT2
Definition: BLI_math_base.h:47
MINLINE float square_f(float a)
MINLINE void rgba_float_args_set(float col[4], const float r, const float g, const float b, const float a)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void copy_v3_v3(float r[3], const float a[3])
void mid_v2_v2v2(float r[2], const float a[2], const float b[2])
Definition: math_vector.c:277
MINLINE void copy_v4_fl(float r[4], float f)
bool BLI_rctf_isect_pt(const struct rctf *rect, const float x, const float y)
bool BLI_rctf_isect(const struct rctf *src1, const struct rctf *src2, struct rctf *dest)
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
Definition: BLI_rect.h:144
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
Definition: rct.c:446
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
Definition: BLI_rect.h:161
void BLI_rctf_union(struct rctf *rct1, const struct rctf *rct2)
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, const size_t maxncpy) ATTR_NONNULL()
Definition: string.c:108
unsigned char uchar
Definition: BLI_sys_types.h:86
unsigned int uint
Definition: BLI_sys_types.h:83
int BLI_cpu_support_sse41(void)
Definition: system.c:153
void BLI_thread_unlock(int type)
Definition: threads.cc:389
void BLI_thread_lock(int type)
Definition: threads.cc:384
@ LOCK_DRAW_IMAGE
Definition: BLI_threads.h:68
#define UNUSED(x)
#define ELEM(...)
#define MIN2(a, b)
#define IFACE_(msgid)
#define MAX_ID_NAME
Definition: DNA_ID.h:269
@ CUMA_DRAW_CFRA
@ CUMA_DRAW_SAMPLE
#define MAX_NAME
Definition: DNA_defs.h:62
@ IMA_TYPE_MULTILAYER
@ IMA_TYPE_COMPOSITE
@ IMA_SRC_MOVIE
@ IMA_SRC_SEQUENCE
#define NODE_FRAME_RESIZEABLE
@ SHD_POINTDENSITY_COLOR_VERTWEIGHT
@ SHD_POINTDENSITY_COLOR_VERTCOL
#define SHD_SKY_NISHITA
#define NODE_LINK_VALID
#define NODE_CUSTOM_COLOR
#define NTREE_TEXTURE
#define SHD_SKY_PREETHAM
#define NODE_SCRIPT_EXTERNAL
@ CMP_NODEFLAG_PLANETRACKDEFORM_MOTION_BLUR
#define NTREE_GEOMETRY
#define SHD_PROJ_BOX
#define SHD_WAVE_BANDS
#define NTREE_COMPOSIT
@ CMP_NODE_DILATEERODE_DISTANCE_THRESH
@ CMP_NODE_DILATEERODE_DISTANCE_FEATHER
#define NTREE_VIEWER_BORDER
#define NODE_LINK_TEMP_HIGHLIGHT
@ SHD_VORONOI_DISTANCE_TO_EDGE
@ SHD_VORONOI_N_SPHERE_RADIUS
#define SHD_SPACE_TANGENT
#define NODE_HIDDEN
@ SOCK_OUT
@ SHD_POINTDENSITY_SOURCE_PSYS
@ NODE_MAP_RANGE_SMOOTHERSTEP
@ NODE_MAP_RANGE_SMOOTHSTEP
@ SOCK_HIDE_VALUE
@ SOCK_MULTI_INPUT
@ SOCK_IN_USE
@ SOCK_COMPACT
@ SOCK_UNAVAIL
#define NODE_FRAME_SHRINK
@ CMP_NODEFLAG_MASK_FIXED_SCENE
@ CMP_NODEFLAG_MASK_FIXED
@ CMP_NODEFLAG_MASK_MOTION_BLUR
@ SOCK_INT
@ SOCK_VECTOR
@ SOCK_BOOLEAN
@ SOCK_FLOAT
@ SOCK_IMAGE
@ SOCK_COLLECTION
@ SOCK_OBJECT
@ SOCK_STRING
@ SOCK_RGBA
#define SHD_TANGENT_UVMAP
#define NODE_SELECT
#define NODE_LINKFLAG_HILITE
#define NODE_SCRIPT_INTERNAL
#define NODE_LINK_MUTED
#define NODE_IES_INTERNAL
#define SHD_SKY_HOSEK
#define NODE_ACTIVE
Object is a sort of wrapper for general info.
@ OB_MESH
#define R_MULTIVIEW
#define CFRA
#define R_IMF_IMTYPE_MULTILAYER
#define R_FILTER_FAST_GAUSS
#define R_IMF_IMTYPE_OPENEXR
@ SNODE_BACKDRAW
@ SPACE_NODE
#define TEX_BLEND
#define TEX_MINKOVSKY
#define TEX_BAND
#define TEX_DISTNOISE
#define TEX_RING
#define TEX_MARBLE
#define TEX_WOOD
void DRW_draw_view(const struct bContext *C)
bool ED_node_is_compositor(struct SpaceNode *snode)
Definition: node_edit.c:449
void ED_node_tag_update_nodetree(struct Main *bmain, struct bNodeTree *ntree, struct bNode *node)
Definition: node_draw.cc:164
NodeBorder
Definition: ED_node.h:44
@ NODE_LEFT
Definition: ED_node.h:47
@ NODE_RIGHT
Definition: ED_node.h:48
@ NODE_BOTTOM
Definition: ED_node.h:46
@ NODE_TOP
Definition: ED_node.h:45
void ED_region_draw_cb_draw(const struct bContext *, struct ARegion *, int)
#define REGION_DRAW_BACKDROP
Definition: ED_space_api.h:69
GPUBatch
Definition: GPU_batch.h:93
#define GPU_batch_uniform_1f(batch, name, x)
Definition: GPU_batch.h:134
#define GPU_batch_uniform_4fv_array(batch, name, len, val)
Definition: GPU_batch.h:145
void GPU_batch_program_set_builtin(GPUBatch *batch, eGPUBuiltinShader shader_id)
Definition: gpu_batch.cc:299
void GPU_batch_instbuf_set(GPUBatch *, GPUVertBuf *, bool own_vbo)
Definition: gpu_batch.cc:141
GPUBatch * GPU_batch_create_ex(GPUPrimType prim, GPUVertBuf *vert, GPUIndexBuf *elem, eGPUBatchFlag owns_flag)
Definition: gpu_batch.cc:60
void GPU_batch_draw(GPUBatch *batch)
Definition: gpu_batch.cc:234
#define GPU_batch_uniform_2fv_array(batch, name, len, val)
Definition: GPU_batch.h:143
@ GPU_BATCH_OWNS_VBO
Definition: GPU_batch.h:45
#define GPU_batch_uniform_1i(batch, name, x)
Definition: GPU_batch.h:132
void gpu_batch_presets_register(struct GPUBatch *preset_batch)
struct GPUFrameBuffer GPUFrameBuffer
void GPU_framebuffer_bind_no_srgb(GPUFrameBuffer *fb)
void GPU_framebuffer_restore(void)
GPUFrameBuffer * GPU_framebuffer_active_get(void)
void immUnbindProgram(void)
void immVertex2f(uint attr_id, float x, float y)
void immUniformThemeColor(int color_id)
void immBindBuiltinProgram(eGPUBuiltinShader shader_id)
GPUVertFormat * immVertexFormat(void)
void immUniformColor3f(float r, float g, float b)
void immBegin(GPUPrimType, uint vertex_len)
void immEnd(void)
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble y1
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei GLsizei GLenum type _GL_VOID_RET _GL_VOID GLsizei GLenum GLenum const void *pixels _GL_VOID_RET _GL_VOID const void *pointer _GL_VOID_RET _GL_VOID GLdouble v _GL_VOID_RET _GL_VOID GLfloat v _GL_VOID_RET _GL_VOID GLint GLint i2 _GL_VOID_RET _GL_VOID GLint j _GL_VOID_RET _GL_VOID GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble GLdouble GLdouble zFar _GL_VOID_RET _GL_UINT GLdouble *equation _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLenum GLfloat *v _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLfloat *values _GL_VOID_RET _GL_VOID GLushort *values _GL_VOID_RET _GL_VOID GLenum GLfloat *params _GL_VOID_RET _GL_VOID GLenum GLdouble *params _GL_VOID_RET _GL_VOID GLenum GLint *params _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_BOOL GLfloat param _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLushort pattern _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLint GLdouble GLdouble GLint GLint const GLdouble *points _GL_VOID_RET _GL_VOID GLdouble GLdouble u2 _GL_VOID_RET _GL_VOID GLdouble GLdouble GLint GLdouble GLdouble v2 _GL_VOID_RET _GL_VOID GLenum GLfloat param _GL_VOID_RET _GL_VOID GLenum GLint param _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLdouble GLdouble nz _GL_VOID_RET _GL_VOID GLfloat GLfloat nz _GL_VOID_RET _GL_VOID GLint GLint nz _GL_VOID_RET _GL_VOID GLshort GLshort nz _GL_VOID_RET _GL_VOID GLsizei const void *pointer _GL_VOID_RET _GL_VOID GLsizei const GLfloat *values _GL_VOID_RET _GL_VOID GLsizei const GLushort *values _GL_VOID_RET _GL_VOID GLint param _GL_VOID_RET _GL_VOID const GLuint const GLclampf *priorities _GL_VOID_RET _GL_VOID GLdouble y _GL_VOID_RET _GL_VOID GLfloat y _GL_VOID_RET _GL_VOID GLint y _GL_VOID_RET _GL_VOID GLshort y _GL_VOID_RET _GL_VOID GLdouble GLdouble z _GL_VOID_RET _GL_VOID GLfloat GLfloat z _GL_VOID_RET _GL_VOID GLint GLint z _GL_VOID_RET _GL_VOID GLshort GLshort z _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble w _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat w _GL_VOID_RET _GL_VOID GLint GLint GLint w _GL_VOID_RET _GL_VOID GLshort GLshort GLshort w _GL_VOID_RET _GL_VOID GLdouble GLdouble x2
_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
_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 const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
void GPU_matrix_pop(void)
Definition: gpu_matrix.cc:142
void GPU_matrix_pop_projection(void)
Definition: gpu_matrix.cc:156
void GPU_matrix_push(void)
Definition: gpu_matrix.cc:135
void GPU_matrix_identity_set(void)
Definition: gpu_matrix.cc:184
void GPU_matrix_push_projection(void)
Definition: gpu_matrix.cc:149
@ GPU_PRIM_LINE_LOOP
Definition: GPU_primitive.h:39
@ GPU_PRIM_LINES
Definition: GPU_primitive.h:36
@ GPU_PRIM_TRI_STRIP
Definition: GPU_primitive.h:40
@ GPU_SHADER_2D_NODELINK_INST
Definition: GPU_shader.h:377
@ GPU_SHADER_2D_UNIFORM_COLOR
Definition: GPU_shader.h:171
@ GPU_SHADER_2D_NODELINK
Definition: GPU_shader.h:376
@ GPU_BLEND_NONE
Definition: GPU_state.h:55
@ GPU_BLEND_ALPHA
Definition: GPU_state.h:57
void GPU_blend(eGPUBlend blend)
Definition: gpu_state.cc:55
void GPU_line_smooth(bool enable)
Definition: gpu_state.cc:85
@ GPU_DEPTH_NONE
Definition: GPU_state.h:78
void GPU_depth_test(eGPUDepthTest test)
Definition: gpu_state.cc:75
struct GPUVertBuf GPUVertBuf
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len)
void GPU_vertbuf_use(GPUVertBuf *)
GPUVertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat *, GPUUsageType)
GPU_INLINE void * GPU_vertbuf_raw_step(GPUVertBufRaw *a)
void GPU_vertbuf_data_len_set(GPUVertBuf *, uint v_len)
void GPU_vertbuf_attr_get_raw_data(GPUVertBuf *, uint a_idx, GPUVertBufRaw *access)
void GPU_vertbuf_attr_set(GPUVertBuf *, uint a_idx, uint v_idx, const void *data)
@ GPU_USAGE_STATIC
@ GPU_USAGE_STREAM
@ GPU_FETCH_FLOAT
@ GPU_FETCH_INT_TO_FLOAT_UNIT
@ GPU_FETCH_INT
uint GPU_vertformat_attr_add(GPUVertFormat *, const char *name, GPUVertCompType, uint comp_len, GPUVertFetchMode)
@ GPU_COMP_F32
@ GPU_COMP_U8
Contains defines and structs used throughout the imbuf module.
struct bNodeTreeType * ntreeType_Shader
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 Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_STUCCI
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 SH_NODE_TEX_BRICK
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 SH_NODE_TEX_COORD
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 SH_NODE_BEVEL
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 SH_NODE_TEX_NOISE
Group RGB to Bright Vector Camera SH_NODE_CLAMP
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 SH_NODE_OUTPUT_LIGHT
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 SH_NODE_VERTEX_COLOR
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
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 SH_NODE_TEX_SKY
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 Anti TEX_NODE_BRICKS
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 SH_NODE_BUMP
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 SH_NODE_TANGENT
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 SH_NODE_BSDF_REFRACTION
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 Distance Hue Movie Ellipse Bokeh View Corner Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_MUSGRAVE
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 Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_NODE_PROC TEX_CLOUDS
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 SH_NODE_RGB
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 Combine Luminance Directional Alpha Distance Hue Movie Ellipse Bokeh View Corner Anti Mix TEX_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 SH_NODE_VECTOR_DISPLACEMENT
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 Movie Ellipse Bokeh View Corner Anti TEX_NODE_MIX_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 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 SH_NODE_CURVE_VEC
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 SH_NODE_OUTPUT_LINESTYLE
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 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 SH_NODE_BSDF_HAIR_PRINCIPLED
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 SH_NODE_TEX_WAVE
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 TEX_VORONOI
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 SH_NODE_VECT_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 SH_NODE_TEX_VORONOI
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 SH_NODE_BSDF_GLOSSY
Group SH_NODE_MIX_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 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 SH_NODE_AMBIENT_OCCLUSION
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 SH_NODE_TEX_WHITE_NOISE
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 SH_NODE_VECTOR_MATH
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 SH_NODE_TEX_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 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 SH_NODE_NORMAL
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 Anti Mix RGB Hue Separate TEX_NODE_PROC TEX_NODE_PROC TEX_MAGIC
Group RGB to Bright Vector Camera Vector Combine Material Light Line Style Layer Add Ambient Diffuse Glossy Refraction Transparent SH_NODE_BSDF_TOON
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 Anti Mix TEX_NODE_VALTORGB
Group RGB to Bright Vector Camera Vector Combine SH_NODE_OUTPUT_MATERIAL
struct bNodeTreeType * ntreeType_Texture
StructRNA RNA_NodeOutputFileSlotFile
StructRNA RNA_NodeOutputFileSlotLayer
StructRNA RNA_MovieTrackingObject
StructRNA RNA_NodeSocket
StructRNA RNA_ImageUser
StructRNA RNA_MovieTracking
StructRNA RNA_Texture
@ PROP_DIRECTION
Definition: RNA_types.h:141
#define C
Definition: RandGen.cpp:39
void uiLayoutSetActive(uiLayout *layout, bool active)
@ UI_ITEM_R_EXPAND
@ UI_ITEM_R_ICON_ONLY
@ UI_ITEM_R_SLIDER
uiBlock * uiLayoutGetBlock(uiLayout *layout)
@ UI_EMBOSS_NONE
Definition: UI_interface.h:108
@ UI_EMBOSS_PULLDOWN
Definition: UI_interface.h:109
void uiTemplateCurveMapping(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
@ UI_CNR_ALL
void UI_draw_roundbox_4fv(const struct rctf *rect, bool filled, float rad, const float col[4])
void uiItemFullO(uiLayout *layout, const char *opname, const char *name, int icon, struct IDProperty *properties, int context, int flag, struct PointerRNA *r_opptr)
uiBut * uiDefBut(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
Definition: interface.c:4687
void uiTemplateColorspaceSettings(struct uiLayout *layout, struct PointerRNA *ptr, const char *propname)
void uiItemL(uiLayout *layout, const char *name, int icon)
const struct uiStyle * UI_style_get(void)
void uiTemplateID(uiLayout *layout, const struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, const bool live_icon, const char *text)
void uiTemplateImageSettings(uiLayout *layout, struct PointerRNA *imfptr, bool color_management)
void UI_draw_roundbox_corner_set(int type)
void uiItemS(uiLayout *layout)
void uiItemFullO_ptr(uiLayout *layout, struct wmOperatorType *ot, const char *name, int icon, struct IDProperty *properties, int context, int flag, struct PointerRNA *r_opptr)
void uiTemplateCryptoPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int icon)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
@ UI_TEMPLATE_ID_FILTER_ALL
void UI_block_end(const struct bContext *C, uiBlock *block)
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
Definition: interface.c:3542
void UI_block_draw(const struct bContext *C, struct uiBlock *block)
#define UI_DPI_FAC
Definition: UI_interface.h:309
void uiItemR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, int flag, const char *name, int icon)
void uiTemplateImage(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, struct PointerRNA *userptr, bool compact, bool multiview)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void UI_draw_roundbox_aa(const struct rctf *rect, bool filled, float rad, const float color[4])
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void uiTemplateIDBrowse(uiLayout *layout, struct bContext *C, struct PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter, const char *text)
void uiTemplateColorRamp(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool expand)
@ UI_BTYPE_LABEL
Definition: UI_interface.h:358
void uiTemplateColorPicker(uiLayout *layout, struct PointerRNA *ptr, const char *propname, bool value_slider, bool lock, bool lock_luminosity, bool cubic)
void uiTemplateList(uiLayout *layout, struct bContext *C, const char *listtype_name, const char *list_id, struct PointerRNA *dataptr, const char *propname, struct PointerRNA *active_dataptr, const char *active_propname, const char *item_dyntip_propname, int rows, int maxrows, int layout_type, int columns, bool sort_reverse, bool sort_lock)
void uiItemPointerR(uiLayout *layout, struct PointerRNA *ptr, const char *propname, struct PointerRNA *searchptr, const char *searchpropname, const char *name, int icon)
void uiTemplateComponentMenu(uiLayout *layout, struct PointerRNA *ptr, const char *propname, const char *name)
void uiTemplateImageFormatViews(uiLayout *layout, struct PointerRNA *imfptr, struct PointerRNA *ptr)
int UI_GetThemeValueType(int colorid, int spacetype)
Definition: resources.c:1184
@ TH_NODE_FRAME
Definition: UI_resources.h:190
@ TH_NODE
Definition: UI_resources.h:176
@ TH_WIRE
Definition: UI_resources.h:85
@ TH_EDGE_SELECT
Definition: UI_resources.h:101
@ TH_REDALERT
Definition: UI_resources.h:50
@ TH_NODE_CURVING
Definition: UI_resources.h:241
@ TH_SELECT
Definition: UI_resources.h:88
@ TH_TEXT
Definition: UI_resources.h:58
@ TH_WIRE_INNER
Definition: UI_resources.h:86
@ TH_ACTIVE
Definition: UI_resources.h:89
@ TH_TEXT_HI
Definition: UI_resources.h:59
void UI_GetThemeColorShadeAlpha4fv(int colorid, int coloffset, int alphaoffset, float col[4])
Definition: resources.c:1286
void UI_GetThemeColor4fv(int colorid, float col[4])
Definition: resources.c:1199
void UI_GetThemeColorBlendShade3ubv(int colorid1, int colorid2, float fac, int offset, unsigned char col[3])
Definition: resources.c:1252
@ WM_OP_INVOKE_DEFAULT
Definition: WM_types.h:197
@ WM_OP_EXEC_DEFAULT
Definition: WM_types.h:204
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
Definition: btDbvt.cpp:52
unsigned int U
Definition: btGjkEpa3.h:78
#define output
#define SELECT
OperationNode * node
const char * label
Scene scene
static CCL_NAMESPACE_BEGIN const double alpha
static void node_buts_image_views(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr, PointerRNA *imaptr)
Definition: drawnode.c:1334
static void node_shader_buts_glossy(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1041
static void node_composit_buts_cryptomatte(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:2705
static void node_buts_normal(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:199
static void node_composit_buts_flip(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1628
static void node_composit_buts_zcombine(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1717
void ED_init_custom_node_type(bNodeType *ntype)
Definition: drawnode.c:3308
static void node_draw_reroute_prepare(const bContext *UNUSED(C), bNodeTree *UNUSED(ntree), bNode *node)
Definition: drawnode.c:503
static void node_composit_buts_map_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1687
static void std_node_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, const char *text)
Definition: drawnode.c:3409
static void node_socket_undefined_draw_color(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PointerRNA *UNUSED(node_ptr), float *r_color)
Definition: drawnode.c:3233
static void node_composit_buts_bokehimage(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2359
#define LINK_RESOL
Definition: drawnode.c:3767
void ED_node_sample_set(const float col[4])
Definition: drawnode.c:170
static void node_buts_frame_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:494
#define NODE_REROUTE_SIZE
Definition: drawnode.c:501
static void node_buts_colorramp(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:157
static void node_buts_texture(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:210
static void node_buts_curvevec(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:162
static void node_composit_buts_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:1385
static int node_tweak_area_reroute(bNode *node, int x, int y)
Definition: drawnode.c:608
static void set_nodelink_vertex(GPUVertBuf *vbo, uint uv_id, uint pos_id, uint exp_id, uint v, const uchar uv[2], const float pos[2], const float exp[2])
Definition: drawnode.c:3803
static void std_node_socket_interface_draw_color(bContext *UNUSED(C), PointerRNA *ptr, float *r_color)
Definition: drawnode.c:3352
static void node_shader_buts_tex_environment(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:771
static void node_composit_buts_switch(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2324
static void node_composit_buts_double_edge_mask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1665
static void node_buts_output_shader(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1128
static void node_file_output_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr)
Definition: drawnode.c:3363
static void node_shader_buts_toon(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1062
static void node_composit_buts_bilateralblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1489
static struct @511 g_batch_link
static void node_composit_buts_map_range(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1679
static void node_shader_buts_tex_gradient(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:839
static void node_composit_buts_planetrackdeform(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:2629
#define ARROW_SIZE
Definition: drawnode.c:3769
static void node_shader_buts_ies(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1079
static void nodelink_batch_add_link(const SpaceNode *snode, const float p0[2], const float p1[2], const float p2[2], const float p3[2], int th_col1, int th_col2, int th_col3, bool drawarrow, bool drawmuted)
Definition: drawnode.c:3982
static void node_composit_buts_transform(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2198
static void node_texture_set_butfunc(bNodeType *ntype)
Definition: drawnode.c:3141
static void node_shader_buts_bump(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:949
static void node_composit_buts_map_uv(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1866
void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link)
Definition: drawnode.c:4068
static void node_shader_buts_script_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:1115
static void node_shader_buts_script(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1096
static void node_composit_buts_splitviewer(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1655
GPUBatch * batch_single
Definition: drawnode.c:3780
static const float std_node_socket_colors[][4]
Definition: drawnode.c:3327
static float mute_verts[3][2]
Definition: drawnode.c:3775
static void node_socket_template_properties_update(bNodeType *ntype, bNodeSocketTemplate *stemp)
Definition: drawnode.c:3198
static void node_composit_buts_denoise(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2747
static void node_composit_buts_translate(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2192
uint p3_id
Definition: drawnode.c:3782
static void node_shader_buts_vect_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:711
static void node_draw_buttons_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:274
static void node_composit_buts_viewer(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2514
static void node_composit_buts_viewer_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2519
static void node_composit_buts_view_levels(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2055
static void node_composit_buts_brightcontrast(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2740
static void node_shader_buts_output_aov(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1162
static void node_shader_buts_tex_musgrave(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:876
static void node_composit_buts_switch_view_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *UNUSED(ptr))
Definition: drawnode.c:2329
static void node_composit_buts_keying(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2571
static void node_shader_buts_tex_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:765
static void node_shader_buts_vect_transform(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:716
static void node_shader_buts_tangent(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:1015
static void node_composit_buts_keyingscreen(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:2553
static void node_shader_buts_wireframe(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:729
static void node_composit_buts_trackpos(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:2589
static void node_shader_buts_vector_rotate(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:705
static void node_composit_buts_sunbeams(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2676
void node_draw_link_bezier(const View2D *v2d, const SpaceNode *snode, const bNodeLink *link, int th_col1, int th_col2, int th_col3)
Definition: drawnode.c:4017
static char nodelink_get_color_id(int th_col)
Definition: drawnode.c:3925
static void node_draw_frame_prepare(const bContext *UNUSED(C), bNodeTree *ntree, bNode *node)
Definition: drawnode.c:284
static void node_shader_buts_tex_pointdensity(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:898
uint p2_id
Definition: drawnode.c:3782
static void node_texture_buts_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:3135
static void node_composit_buts_moviedistortion(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:2203
static void node_shader_buts_clamp(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:225
static void node_composit_buts_rotate(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2036
static void node_composit_buts_glare(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1543
static void node_shader_buts_uvmap(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:954
GPUVertBufRaw p3_step
Definition: drawnode.c:3784
static void node_shader_buts_mapping(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:700
uint muted_id
Definition: drawnode.c:3783
static void node_composit_buts_ycc(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2149
static void node_composit_buts_color_spill(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1779
static void node_shader_buts_bevel(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1143
static void node_common_set_butfunc(bNodeType *ntype)
Definition: drawnode.c:619
static void node_shader_buts_tex_wave(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:862
static void node_composit_buts_alphaover(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1708
GPUVertBufRaw colid_step
Definition: drawnode.c:3785
static void node_shader_buts_principled(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1046
static void node_composit_buts_color_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1819
#define NODELINK_GROUP_SIZE
Definition: drawnode.c:3766
static float arrow_verts[3][2]
Definition: drawnode.c:3773
GPUVertBufRaw muted_step
Definition: drawnode.c:3785
static void node_composit_buts_stabilize2d(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:2177
static void node_composit_buts_despeckle(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1745
static void node_composit_buts_file_output_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:1890
static void node_buts_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:107
static void node_composit_buts_dilateerode(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1726
static void node_composit_buts_composite(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2509
void ED_init_node_socket_type_virtual(bNodeSocketType *stype)
Definition: drawnode.c:3542
static void node_composit_buts_cryptomatte_legacy(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2682
static void node_composit_buts_channel_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1829
static void node_composit_buts_blur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1429
static void nodelink_batch_init(void)
Definition: drawnode.c:3817
static float _sample_col[4]
Definition: drawnode.c:169
void nodelink_batch_start(SpaceNode *UNUSED(snode))
Definition: drawnode.c:3971
bool node_link_bezier_points(const View2D *v2d, const SpaceNode *snode, const bNodeLink *link, float coord_array[][2], const int resol)
Definition: drawnode.c:3746
void nodelink_batch_end(SpaceNode *snode)
Definition: drawnode.c:3976
static void node_composit_buts_bokehblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2368
static void node_property_update_default(Main *bmain, Scene *UNUSED(scene), PointerRNA *ptr)
Definition: drawnode.c:3191
static int node_resize_area_frame(bNode *node, int x, int y)
Definition: drawnode.c:466
static void node_shader_buts_tex_noise(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:893
static void node_composit_buts_colorcorrection_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2273
bool enabled
Definition: drawnode.c:3787
static void node_texture_buts_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:3126
static void node_composit_buts_scale(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2023
static void node_composit_buts_mask(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:2532
uint p0_id
Definition: drawnode.c:3782
static void node_socket_virtual_draw_color(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), PointerRNA *UNUSED(node_ptr), float *r_color)
Definition: drawnode.c:3534
static void node_buts_value(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:96
static void std_node_socket_draw_color(bContext *UNUSED(C), PointerRNA *ptr, PointerRNA *UNUSED(node_ptr), float *r_color)
Definition: drawnode.c:3343
static void node_composit_buts_diff_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1754
static void node_shader_buts_tex_brick(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:849
GPUBatch * batch
Definition: drawnode.c:3779
static void node_composit_set_butfunc(bNodeType *ntype)
Definition: drawnode.c:2764
static void node_composit_buts_vecblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1607
static void node_shader_buts_normal_map(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:993
static void node_composit_buts_tonemap(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1575
GPUVertBufRaw p0_step
Definition: drawnode.c:3784
static void node_buts_mix_rgb(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:121
static void node_composit_buts_set_alpha(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2319
static void node_shader_buts_principled_hair(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1072
static void node_composit_buts_colorbalance(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2060
static void node_composit_buts_crop(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1633
static void node_socket_button_label(bContext *UNUSED(C), uiLayout *layout, PointerRNA *UNUSED(ptr), PointerRNA *UNUSED(node_ptr), const char *text)
Definition: drawnode.c:85
static const float virtual_node_socket_color[4]
Definition: drawnode.c:3324
void draw_nodespace_back_pix(const bContext *C, ARegion *region, SpaceNode *snode, bNodeInstanceKey parent_key)
Definition: drawnode.c:3550
static void node_composit_buts_viewlayers(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:1395
static void node_composit_backdrop_boxmask(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
Definition: drawnode.c:2405
static void node_texture_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:3112
GPUVertBuf * inst_vbo
Definition: drawnode.c:3781
static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:1357
void ED_node_draw_snap(View2D *v2d, const float cent[2], float size, NodeBorder border, uint pos)
Definition: drawnode.c:4117
static void node_buts_time(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:135
static void node_socket_undefined_draw(bContext *UNUSED(C), uiLayout *layout, PointerRNA *UNUSED(ptr), PointerRNA *UNUSED(node_ptr), const char *UNUSED(text))
Definition: drawnode.c:3224
static void node_composit_buts_id_mask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1871
static void node_draw_reroute(const bContext *C, ARegion *region, SpaceNode *UNUSED(snode), bNodeTree *ntree, bNode *node, bNodeInstanceKey UNUSED(key))
Definition: drawnode.c:528
uint count
Definition: drawnode.c:3786
static void node_buts_output_linestyle(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1133
static void node_composit_buts_dblur(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1465
static void node_composit_buts_cryptomatte_legacy_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *UNUSED(ptr))
Definition: drawnode.c:2697
static void node_shader_buts_attribute(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:723
static void node_shader_buts_uvalongstroke(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:988
static void node_shader_buts_subsurface(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1057
GPUVertBufRaw p2_step
Definition: drawnode.c:3784
static void node_composit_buts_ellipsemask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2495
static void node_shader_buts_ambient_occlusion(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1148
static void node_composit_backdrop_ellipsemask(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
Definition: drawnode.c:2450
static void node_draw_frame(const bContext *C, ARegion *region, SpaceNode *snode, bNodeTree *ntree, bNode *node, bNodeInstanceKey UNUSED(key))
Definition: drawnode.c:412
static void node_shader_buts_vertex_color(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:968
#define DEFAULT_FLAGS
Definition: drawnode.c:81
void ED_init_custom_node_socket_type(bNodeSocketType *stype)
Definition: drawnode.c:3318
static void node_composit_buts_boxmask(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2343
static void node_shader_buts_hair(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1067
static void node_buts_math(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:240
static void node_composit_buts_antialiasing(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1531
static void node_composit_buts_chroma_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1805
static void node_shader_buts_map_range(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:230
void ED_node_init_butfuncs(void)
Definition: drawnode.c:3261
static void node_composit_buts_colorcorrection(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2217
uint colid_id
Definition: drawnode.c:3783
static void node_composit_backdrop_viewer(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
Definition: drawnode.c:2376
bool node_link_bezier_handles(const View2D *v2d, const SpaceNode *snode, const bNodeLink *link, float vec[4][2])
Definition: drawnode.c:3637
static void node_shader_buts_tex_environment_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:794
static void node_shader_buts_tex_sky(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:803
static void node_composit_buts_premulkey(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2050
static void node_shader_buts_displacement(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1010
void ED_init_standard_node_socket_type(bNodeSocketType *stype)
Definition: drawnode.c:3526
static void node_shader_set_butfunc(bNodeType *ntype)
Definition: drawnode.c:1168
static void node_shader_buts_white_noise(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1157
static void node_composit_buts_huecorrect(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2133
static void nodelink_batch_draw(const SpaceNode *snode)
Definition: drawnode.c:3942
static void node_composit_buts_colorbalance_ex(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2104
GPUVertBufRaw p1_step
Definition: drawnode.c:3784
static void std_node_socket_interface_draw(bContext *UNUSED(C), uiLayout *layout, PointerRNA *ptr)
Definition: drawnode.c:3486
static void nodelink_batch_reset(void)
Definition: drawnode.c:3790
static void node_template_properties_update(bNodeType *ntype)
Definition: drawnode.c:3208
static void node_composit_buts_luma_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1857
static void node_composit_buts_file_output(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1877
static void node_composit_buts_distance_matte(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1763
static void node_shader_buts_tex_magic(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:844
static void node_socket_undefined_interface_draw_color(bContext *UNUSED(C), PointerRNA *UNUSED(ptr), float *r_color)
Definition: drawnode.c:3251
static int node_resize_area_default(bNode *node, int x, int y)
Definition: drawnode.c:246
static void node_shader_buts_tex_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:734
static void node_buts_curvecol(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:180
static void node_draw_frame_label(bNodeTree *ntree, bNode *node, const float aspect)
Definition: drawnode.c:333
static void node_buts_image_user(uiLayout *layout, bContext *C, PointerRNA *ptr, PointerRNA *imaptr, PointerRNA *iuserptr, const bool show_layer_selection, const bool show_color_management)
Definition: drawnode.c:641
static void node_socket_undefined_interface_draw(bContext *UNUSED(C), uiLayout *layout, PointerRNA *UNUSED(ptr))
Definition: drawnode.c:3244
#define SAMPLE_FLT_ISNONE
Definition: drawnode.c:167
static float mute_expand_axis[3][2]
Definition: drawnode.c:3776
static void node_composit_buts_movieclip_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:2160
uint p1_id
Definition: drawnode.c:3782
static void node_composit_buts_defocus(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:1501
static void node_texture_buts_proc(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:3027
static void node_composit_buts_invert(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:2041
static void node_shader_buts_tex_coord(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:943
static void node_shader_buts_anisotropic(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1052
static void node_texture_buts_bricks(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:3014
static float arrow_expand_axis[3][2]
Definition: drawnode.c:3774
static void node_composit_buts_inpaint(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1740
static void node_composit_buts_cornerpin(uiLayout *UNUSED(layout), bContext *UNUSED(C), PointerRNA *UNUSED(ptr))
Definition: drawnode.c:2670
static void node_composit_buts_filter(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1623
static void node_shader_buts_tex_voronoi(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:882
static void node_composit_buts_movieclip(uiLayout *layout, bContext *C, PointerRNA *ptr)
Definition: drawnode.c:2154
static void node_composit_buts_lensdist(uiLayout *layout, bContext *UNUSED(C), PointerRNA *ptr)
Definition: drawnode.c:1594
#define LINK_WIDTH
Definition: drawnode.c:3768
bNodeTree * ntree
uint pos
uint col
DO_INLINE void filter(lfVector *V, fmatrix3x3 *S)
IconTextureDrawCall border
#define sinf(x)
#define cosf(x)
#define floorf(x)
#define fabsf(x)
format
Definition: logImageCore.h:47
INLINE Rall1d< T, V, S > exp(const Rall1d< T, V, S > &arg)
Definition: rall1d.h:295
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
Definition: abc_util.cc:115
bNodeTreeType * ntreeType_Composite
void node_from_view(const bNode *node, float x, float y, float *rx, float *ry)
Definition: node_draw.cc:340
void node_draw_default(const bContext *C, ARegion *region, SpaceNode *snode, bNodeTree *ntree, bNode *node, bNodeInstanceKey key)
Definition: node_draw.cc:1746
int node_get_colorid(bNode *node)
Definition: node_draw.cc:661
void node_to_view(const bNode *node, float x, float y, float *rx, float *ry)
Definition: node_draw.cc:323
int node_tweak_area_default(bNode *node, int x, int y)
Definition: node_draw.cc:656
void node_draw_sockets(const View2D *v2d, const bContext *C, bNodeTree *ntree, bNode *node, bool draw_outputs, bool select_all)
Definition: node_draw.cc:999
void node_draw_shadow(const SpaceNode *snode, const bNode *node, float radius, float alpha)
Definition: node_draw.cc:992
int node_select_area_default(bNode *node, int x, int y)
Definition: node_draw.cc:651
void node_update_default(const bContext *C, bNodeTree *ntree, bNode *node)
Definition: node_draw.cc:641
void node_link_calculate_multi_input_position(const float socket_x, const float socket_y, const int index, const int total_inputs, float r[2])
Definition: node_edit.c:111
void node_geometry_add_attribute_search_button(const bContext *C, const bNodeTree *node_tree, const bNode *node, PointerRNA *socket_ptr, uiLayout *layout)
bNodeTreeType * ntreeType_Geometry
#define BASIS_RAD
Definition: node_intern.h:325
#define NODE_RESIZE_MARGIN
Definition: node_intern.h:334
#define NODE_DYS
Definition: node_intern.h:326
#define NODE_DY
Definition: node_intern.h:327
static void expand_id(BlendExpander *expander, ID *id)
Definition: readfile.c:4553
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
Definition: rna_access.c:146
void RNA_string_set(PointerRNA *ptr, const char *name, const char *value)
Definition: rna_access.c:6550
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6562
int RNA_collection_length(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6634
void RNA_id_pointer_create(ID *id, PointerRNA *r_ptr)
Definition: rna_access.c:122
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
Definition: rna_access.c:866
int RNA_property_collection_lookup_int(PointerRNA *ptr, PropertyRNA *prop, int key, PointerRNA *r_ptr)
Definition: rna_access.c:4212
void RNA_string_get(PointerRNA *ptr, const char *name, char *value)
Definition: rna_access.c:6514
int RNA_int_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6308
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
Definition: rna_access.c:953
bool RNA_property_enum_identifier(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **identifier)
Definition: rna_access.c:1925
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
Definition: rna_access.c:3543
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6261
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
Definition: rna_access.c:6413
int RNA_enum_get(PointerRNA *ptr, const char *name)
Definition: rna_access.c:6402
bool RNA_property_enum_name(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **name)
Definition: rna_access.c:1943
void RNA_def_property_update_runtime(PropertyRNA *prop, const void *func)
Definition: rna_define.c:2938
float sample[3]
StructRNA * srna
Definition: RNA_types.h:681
Definition: DNA_ID.h:273
void * first
Definition: DNA_listBase.h:47
Definition: BKE_main.h:116
struct MovieTracking tracking
void * data
void * data
Definition: RNA_types.h:52
struct ID * owner_id
Definition: RNA_types.h:50
int lines
Definition: BLF_api.h:296
struct RenderData r
SpaceNode_Runtime * runtime
struct bNodeTree * edittree
struct bNodeTree * nodetree
short stype
short vn_distm
short type
ListBase lines
unsigned int value
Compact definition of a node socket.
Definition: BKE_node.h:95
char identifier[64]
Definition: BKE_node.h:105
Defines a socket type.
Definition: BKE_node.h:143
void(* draw_color)(struct bContext *C, struct PointerRNA *ptr, struct PointerRNA *node_ptr, float *r_color)
Definition: BKE_node.h:151
void(* interface_draw_color)(struct bContext *C, struct PointerRNA *ptr, float *r_color)
Definition: BKE_node.h:157
void(* draw)(struct bContext *C, struct uiLayout *layout, struct PointerRNA *ptr, struct PointerRNA *node_ptr, const char *text)
Definition: BKE_node.h:146
void(* interface_draw)(struct bContext *C, struct uiLayout *layout, struct PointerRNA *ptr)
Definition: BKE_node.h:156
struct bNodeSocketType * typeinfo
short total_inputs
ListBase nodes
bNodeInstanceKey active_viewer_key
rctf viewer_border
Defines a node type.
Definition: BKE_node.h:221
int(* tweak_area_func)(struct bNode *node, int x, int y)
Definition: BKE_node.h:271
void(* draw_nodetype)(const struct bContext *C, struct ARegion *region, struct SpaceNode *snode, struct bNodeTree *ntree, struct bNode *node, bNodeInstanceKey key)
Definition: BKE_node.h:241
ExtensionRNA rna_ext
Definition: BKE_node.h:330
int type
Definition: BKE_node.h:225
bNodeSocketTemplate * outputs
Definition: BKE_node.h:236
void(* draw_buttons_ex)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
Definition: BKE_node.h:255
void(* draw_nodetype_prepare)(const struct bContext *C, struct bNodeTree *ntree, struct bNode *node)
Definition: BKE_node.h:248
void(* draw_buttons)(struct uiLayout *, struct bContext *C, struct PointerRNA *ptr)
Definition: BKE_node.h:253
bNodeSocketTemplate * inputs
Definition: BKE_node.h:236
int(* select_area_func)(struct bNode *node, int x, int y)
Definition: BKE_node.h:269
int(* resize_area_func)(struct bNode *node, int x, int y)
Definition: BKE_node.h:267
void(* draw_backdrop)(struct SpaceNode *snode, struct ImBuf *backdrop, struct bNode *node, int x, int y)
Definition: BKE_node.h:258
short type
float xmax
Definition: DNA_vec_types.h:85
float xmin
Definition: DNA_vec_types.h:85
float ymax
Definition: DNA_vec_types.h:86
float ymin
Definition: DNA_vec_types.h:86
uiFontStyle widgetlabel
PointerRNA * ptr
Definition: wm_files.c:3157
wmOperatorType * ot
Definition: wm_files.c:3156
wmOperatorType * WM_operatortype_find(const char *idname, bool quiet)
void wmOrtho2_region_pixelspace(const ARegion *region)
Definition: wm_subwindow.c:120