51#include "RNA_prototypes.hh"
78#define DEFAULT_FLAGS UI_ITEM_R_SPLIT_EMPTY_NAME
88 uiItemL(layout, text, ICON_NONE);
157#define SAMPLE_FLT_ISNONE FLT_MAX
182 cumap->
flag &= ~CUMA_DRAW_SAMPLE;
205 short multi = (node->id && ((
Tex *)node->id)->use_nodes && (node->type !=
CMP_NODE_TEXTURE) &&
206 (node->type != TEX_NODE_TEXTURE));
208 uiTemplateID(layout, C,
ptr,
"texture",
"texture.new",
nullptr,
nullptr);
244 const rctf &totr = node->runtime->totr;
264 rctf totr = node->runtime->totr;
265 totr.
xmin = node->runtime->totr.xmax - 1.0f *
U.widget_unit;
273 const rctf &totr = node->runtime->totr;
301 switch (ntype->
type) {
318 const bool show_layer_selection,
319 const bool show_color_management)
341 uiItemL(layout, numstr, ICON_NONE);
360 if (show_color_management) {
388 uiTemplateID(layout, C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
416 uiTemplateID(layout, C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
456 switch (ntype->
type) {
546 uiTemplateID(layout, C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
577 cumap->
flag &= ~CUMA_DRAW_SAMPLE;
603 const float backdropWidth = backdrop->x;
604 const float backdropHeight = backdrop->y;
605 const float aspect = backdropWidth / backdropHeight;
606 const float rad = -boxmask->
rotation;
607 const float cosine =
cosf(rad);
608 const float sine =
sinf(rad);
609 const float halveBoxWidth = backdropWidth * (boxmask->
width / 2.0f);
610 const float halveBoxHeight = backdropHeight * (boxmask->
height / 2.0f) * aspect;
612 float cx, cy, x1, x2, x3, x4;
613 float y1, y2, y3, y4;
615 cx = x + snode->
zoom * backdropWidth * boxmask->
x;
616 cy = y + snode->
zoom * backdropHeight * boxmask->
y;
618 x1 = cx - (cosine * halveBoxWidth + sine * halveBoxHeight) * snode->
zoom;
619 x2 = cx - (cosine * -halveBoxWidth + sine * halveBoxHeight) * snode->
zoom;
620 x3 = cx - (cosine * -halveBoxWidth + sine * -halveBoxHeight) * snode->
zoom;
621 x4 = cx - (cosine * halveBoxWidth + sine * -halveBoxHeight) * snode->
zoom;
622 y1 = cy - (-sine * halveBoxWidth + cosine * halveBoxHeight) * snode->
zoom;
623 y2 = cy - (-sine * -halveBoxWidth + cosine * halveBoxHeight) * snode->
zoom;
624 y3 = cy - (-sine * -halveBoxWidth + cosine * -halveBoxHeight) * snode->
zoom;
625 y4 = cy - (-sine * halveBoxWidth + cosine * -halveBoxHeight) * snode->
zoom;
648 const float backdropWidth = backdrop->x;
649 const float backdropHeight = backdrop->y;
650 const float aspect = backdropWidth / backdropHeight;
651 const float rad = -ellipsemask->
rotation;
652 const float cosine =
cosf(rad);
653 const float sine =
sinf(rad);
654 const float halveBoxWidth = backdropWidth * (ellipsemask->
width / 2.0f);
655 const float halveBoxHeight = backdropHeight * (ellipsemask->
height / 2.0f) * aspect;
657 float cx, cy, x1, x2, x3, x4;
658 float y1, y2, y3, y4;
660 cx = x + snode->
zoom * backdropWidth * ellipsemask->
x;
661 cy = y + snode->
zoom * backdropHeight * ellipsemask->
y;
663 x1 = cx - (cosine * halveBoxWidth + sine * halveBoxHeight) * snode->
zoom;
664 x2 = cx - (cosine * -halveBoxWidth + sine * halveBoxHeight) * snode->
zoom;
665 x3 = cx - (cosine * -halveBoxWidth + sine * -halveBoxHeight) * snode->
zoom;
666 x4 = cx - (cosine * halveBoxWidth + sine * -halveBoxHeight) * snode->
zoom;
667 y1 = cy - (-sine * halveBoxWidth + cosine * halveBoxHeight) * snode->
zoom;
668 y2 = cy - (-sine * -halveBoxWidth + cosine * halveBoxHeight) * snode->
zoom;
669 y3 = cy - (-sine * -halveBoxWidth + cosine * -halveBoxHeight) * snode->
zoom;
670 y4 = cy - (-sine * halveBoxWidth + cosine * -halveBoxHeight) * snode->
zoom;
708 uiItemO(layout,
IFACE_(
"Add Crypto Layer"), ICON_ADD,
"NODE_OT_cryptomatte_layer_add");
709 uiItemO(layout,
IFACE_(
"Remove Crypto Layer"), ICON_REMOVE,
"NODE_OT_cryptomatte_layer_remove");
748 switch (ntype->
type) {
911 uiTemplateID(layout, C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
938 switch (ntype->
type) {
1015 for (stemp = ntype->
inputs; stemp->
type >= 0; stemp++) {
1020 for (stemp = ntype->
outputs; stemp->
type >= 0; stemp++) {
1032 uiItemL(layout,
IFACE_(
"Undefined Socket Type"), ICON_ERROR);
1060 uiItemL(layout,
IFACE_(
"Undefined Socket Type"), ICON_ERROR);
1081 NodeSocketTypeUndefined.
draw = node_socket_undefined_draw;
1082 NodeSocketTypeUndefined.
draw_color = node_socket_undefined_draw_color;
1083 NodeSocketTypeUndefined.
draw_color_simple = node_socket_undefined_draw_color_simple;
1084 NodeSocketTypeUndefined.
interface_draw = node_socket_undefined_interface_draw;
1088 node_common_set_butfunc(ntype);
1090 node_composit_set_butfunc(ntype);
1091 node_shader_set_butfunc(ntype);
1092 node_texture_set_butfunc(ntype);
1095 node_template_properties_update(ntype);
1113 {0.63, 0.63, 0.63, 1.0},
1114 {0.39, 0.39, 0.78, 1.0},
1115 {0.78, 0.78, 0.16, 1.0},
1116 {0.39, 0.78, 0.39, 1.0},
1117 {0.80, 0.65, 0.84, 1.0},
1118 {0.0, 0.0, 0.0, 0.0},
1119 {0.35, 0.55, 0.36, 1.0},
1120 {0.44, 0.70, 1.00, 1.0},
1121 {0.93, 0.62, 0.36, 1.0},
1122 {0.39, 0.22, 0.39, 1.0},
1123 {0.00, 0.84, 0.64, 1.0},
1124 {0.96, 0.96, 0.96, 1.0},
1125 {0.62, 0.31, 0.64, 1.0},
1126 {0.92, 0.46, 0.51, 1.0},
1127 {0.65, 0.39, 0.78, 1.0},
1128 {0.40, 0.40, 0.40, 1.0},
1129 {0.72, 0.20, 0.52, 1.0},
1133template<
int socket_type>
1189 uiItemL(row, input->layer, ICON_NONE);
1196 uiItemL(row, input->path, ICON_NONE);
1202 const char *imtype_name;
1211 uiItemL(row, imtype_name, ICON_NONE);
1219 if (node_decl ==
nullptr) {
1228 const int socket_index =
BLI_findindex(&node.inputs, &socket);
1229 return node_decl->
inputs[socket_index]->is_attribute_name;
1239 if (sock->
runtime->declaration) {
1240 if (sock->
runtime->declaration->socket_name_rna) {
1244 sock->
runtime->declaration->socket_name_rna->property_name.c_str(),
1251 uiItemL(layout, text, ICON_NONE);
1269 if (node->type == CMP_NODE_OUTPUT_FILE) {
1274 const bool has_gizmo =
tree->runtime->gizmo_propagation ?
1275 tree->runtime->gizmo_propagation->gizmo_endpoint_sockets.contains(
1282 FN_NODE_INPUT_VECTOR,
1285 FN_NODE_INPUT_ROTATION,
1288 if (node->is_group_input()) {
1319 const char *
label = text;
1324 bool gizmo_handled =
false;
1347 gizmo_handled =
true;
1361 gizmo_handled =
true;
1372 if (text[0] ==
'\0') {
1377 uiItemL(row, text, ICON_NONE);
1384 if (text[0] ==
'\0') {
1389 uiItemL(row, text, ICON_NONE);
1394 if (text[0] ==
'\0') {
1407 uiItemL(row, text, ICON_NONE);
1417 if (default_value->
enum_items->items.is_empty()) {
1419 uiItemL(row, text, ICON_NONE);
1426 else if (default_value->has_conflict()) {
1441 if (text[0] ==
'\0') {
1442 uiTemplateID(layout, C,
ptr,
"default_value",
"image.new",
"image.open",
nullptr);
1447 uiItemL(row, text, ICON_NONE);
1448 uiTemplateID(row, C,
ptr,
"default_value",
"image.new",
"image.open",
nullptr);
1461 if (text[0] ==
'\0') {
1462 uiTemplateID(layout, C,
ptr,
"default_value",
"texture.new",
nullptr,
nullptr);
1467 uiItemL(row, text, ICON_NONE);
1468 uiTemplateID(row, C,
ptr,
"default_value",
"texture.new",
nullptr,
nullptr);
1482 if (has_gizmo && !gizmo_handled) {
1606 stype->
draw = std_node_socket_draw;
1615 stype->
draw = node_socket_button_label;
1616 stype->
draw_color = node_socket_virtual_draw_color;
1661 if (parent_key.
value != active_viewer_key.
value) {
1687 const float x = (region.winx - snode.
zoom * ibuf->
x) / 2 + offset_x;
1688 const float y = (region.winy - snode.
zoom * ibuf->
y) / 2 + offset_y;
1697 if (node->typeinfo->draw_backdrop) {
1698 node->typeinfo->draw_backdrop(&snode, ibuf, node, x, y);
1705 viewer_border->
xmin < viewer_border->
xmax && viewer_border->
ymin < viewer_border->
ymax)
1709 x + snode.
zoom * viewer_border->
xmin * ibuf->
x,
1710 x + snode.
zoom * viewer_border->
xmax * ibuf->
x,
1711 y + snode.
zoom * viewer_border->
ymin * ibuf->
y,
1712 y + snode.
zoom * viewer_border->
ymax * ibuf->
y);
1736 if (socket.is_multi_input() && socket.is_input() && !(node.flag &
NODE_HIDDEN)) {
1742 return socket_location;
1759 const float clamp_factor =
math::min(1.0f, slope * (4.5f - 0.25f *
float(curving)));
1761 const float handle_offset = curving * 0.1f * dist_x * clamp_factor;
1763 points[1].x = points[0].x + handle_offset;
1764 points[1].y = points[0].y;
1766 points[2].x = points[3].x - handle_offset;
1767 points[2].y = points[3].y;
1773 std::array<float2, 4> points;
1782 if (
min_ffff(points[0].x, points[1].x, points[2].x, points[3].x) > v2d.
cur.
xmax) {
1785 if (
max_ffff(points[0].x, points[1].x, points[2].x, points[3].x) < v2d.
cur.
xmin) {
1792 std::array<float2, NODE_LINK_RESOL + 1> &coords)
1813#define NODELINK_GROUP_SIZE 256
1814#define LINK_RESOL 24
1815#define LINK_WIDTH 2.5f
1816#define ARROW_SIZE (7 * UI_SCALE_FAC)
1820static float arrow_verts[3][2] = {{-1.0f, 1.0f}, {0.0f, 0.0f}, {-1.0f, -1.0f}};
1822static float mute_verts[3][2] = {{0.7071f, 1.0f}, {0.7071f, 0.0f}, {0.7071f, -1.0f}};
1902 for (
int k = 0; k < 2; k++) {
1903 uchar uv[2] = {0, 0};
1904 float pos[2] = {0.0f, 0.0f};
1905 float exp[2] = {0.0f, 1.0f};
1929 for (
int i = 0; i < 3; i++) {
1948 for (
int i = 0; i < 3; ++i) {
2091 const std::array<float2, 4> &points,
2132 BLI_rctf_init(&rect, center.x - radius, center.x + radius, center.y - radius, center.y + radius);
2142 const std::array<float2, 4> &points,
2145 const float radius = (outline ? 0.65f : 0.45f) *
NODE_SOCKSIZE;
2177 tree.runtime->sockets_on_active_gizmo_paths.contains(link.
tosock);
2187 const bool selected)
2191 draw_config.
th_col1 = th_col1;
2192 draw_config.
th_col2 = th_col2;
2193 draw_config.
th_col3 = th_col3;
2203 draw_config.
dash_factor = field_link ? 0.75f : 1.0f;
2209 (field_link ? 0.7f : 1.0f);
2250 const float alpha = color_selected.
a;
2275 const std::array<float2, 4> &points)
2287 for (
const int i :
IndexRange(points.size())) {
2325 const bool selected)
2332 C, v2d, snode, link, th_col1, th_col2, th_col3, selected);
2341 const bool selected)
2379 std::array<float2, 4> points;
void immDrawBorderCorners(unsigned int pos, const rcti *border, float zoomx, float zoomy)
Scene * CTX_data_scene(const bContext *C)
Main * CTX_data_main(const bContext *C)
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
ImBuf * BKE_image_acquire_ibuf(Image *ima, ImageUser *iuser, void **r_lock)
Image * BKE_image_ensure_viewer(Main *bmain, int type, const char *name)
void BKE_image_release_ibuf(Image *ima, ImBuf *ibuf, void *lock)
bool BKE_image_is_dirty(Image *image)
int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, bool *r_is_in_range)
#define CMP_NODE_VALTORGB
#define SH_NODE_COMBINE_COLOR
#define NODE_TYPES_BEGIN(ntype)
#define SH_NODE_MIX_RGB_LEGACY
#define SH_NODE_CURVE_FLOAT
#define SH_NODE_OUTPUT_WORLD
#define CMP_NODE_MASK_ELLIPSE
#define SH_NODE_TEX_IMAGE
#define TEX_NODE_PROC_MAX
#define CMP_NODE_COMBYCCA_LEGACY
#define CMP_NODE_SEPARATE_COLOR
#define CMP_NODE_CRYPTOMATTE
#define SH_NODE_SEPARATE_COLOR
#define SH_NODE_TEX_ENVIRONMENT
#define SH_NODE_CURVE_VEC
#define CMP_NODE_HUECORRECT
#define TEX_NODE_COMBINE_COLOR
#define TEX_NODE_SEPARATE_COLOR
#define CMP_NODE_CRYPTOMATTE_LEGACY
#define SH_NODE_OUTPUT_MATERIAL
#define CMP_NODE_CURVE_RGB
#define CMP_NODE_COMBINE_COLOR
#define SH_NODE_VECTOR_DISPLACEMENT
#define SH_NODE_CURVE_RGB
#define CMP_NODE_MASK_BOX
#define TEX_NODE_CURVE_TIME
#define SH_NODE_BSDF_GLASS
#define SH_NODE_DISPLACEMENT
#define CMP_NODE_SEPYCCA_LEGACY
#define SH_NODE_BSDF_REFRACTION
#define SH_NODE_OUTPUT_LIGHT
#define SH_NODE_VOLUME_SCATTER
#define TEX_NODE_VALTORGB
#define TEX_NODE_CURVE_RGB
void BKE_ntree_update_tag_node_property(bNodeTree *ntree, bNode *node)
#define BLI_assert_unreachable()
int BLI_findindex(const struct ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE float max_ffff(float a, float b, float c, float d)
MINLINE float max_ff(float a, float b)
MINLINE float min_ffff(float a, float b, float c, float d)
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 interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
MINLINE void copy_v4_fl(float r[4], float f)
void BLI_rcti_init(struct rcti *rect, int xmin, int xmax, int ymin, int ymax)
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
bool BLI_rctf_isect_pt(const struct rctf *rect, float x, float y)
#define SNPRINTF(dst, format,...)
void BLI_thread_unlock(int type)
void BLI_thread_lock(int type)
@ NODE_INTERFACE_SOCKET_INPUT
#define NODE_INPUT_DEFAULT_VALUE
@ CMP_NODE_COMBSEP_COLOR_YCC
@ NODE_LINK_TEMP_HIGHLIGHT
@ NODE_LINK_INSERT_TARGET
@ NODE_LINK_INSERT_TARGET_INVALID
@ CMP_NODE_CRYPTOMATTE_SOURCE_RENDER
Object is a sort of wrapper for general info.
@ R_IMF_IMTYPE_MULTILAYER
@ SN_OVERLAY_SHOW_WIRE_COLORS
@ SN_OVERLAY_SHOW_OVERLAYS
void DRW_draw_view(const bContext *C)
void ED_node_tree_propagate_change(const bContext *C, Main *bmain, bNodeTree *ntree)
bool ED_node_is_compositor(const SpaceNode *snode)
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
#define REGION_DRAW_BACKDROP
blender::gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, eGPUBatchFlag owns_flag)
void GPU_batch_instbuf_set(blender::gpu::Batch *batch, blender::gpu::VertBuf *vertex_buf, bool own_vbo)
#define GPU_batch_uniformbuf_bind(batch, name, ubo)
void GPU_batch_program_set_builtin(blender::gpu::Batch *batch, eGPUBuiltinShader shader_id)
void GPU_batch_draw(blender::gpu::Batch *batch)
void gpu_batch_presets_register(blender::gpu::Batch *preset_batch)
GPUFrameBuffer * GPU_framebuffer_active_get()
void GPU_framebuffer_restore()
void GPU_framebuffer_bind_no_srgb(GPUFrameBuffer *framebuffer)
void GPU_matrix_identity_set()
void GPU_matrix_push_projection()
void GPU_matrix_pop_projection()
@ GPU_SHADER_2D_NODELINK_INST
@ GPU_SHADER_3D_UNIFORM_COLOR
void GPU_blend(eGPUBlend blend)
void GPU_depth_test(eGPUDepthTest test)
void GPU_vertbuf_attr_get_raw_data(blender::gpu::VertBuf *, uint a_idx, GPUVertBufRaw *access)
GPU_INLINE void * GPU_vertbuf_raw_step(GPUVertBufRaw *a)
void GPU_vertbuf_use(blender::gpu::VertBuf *)
blender::gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
void GPU_vertbuf_data_len_set(blender::gpu::VertBuf &verts, uint v_len)
void GPU_vertbuf_attr_set(blender::gpu::VertBuf *, uint a_idx, uint v_idx, const void *data)
void GPU_vertbuf_data_alloc(blender::gpu::VertBuf &verts, uint v_len)
bool IMB_colormanagement_space_name_is_data(const char *name)
Contains defines and structs used throughout the imbuf module.
void uiLayoutSetActive(uiLayout *layout, bool active)
void UI_draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4])
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, PointerRNA *userptr, bool compact, bool multiview)
void uiItemL(uiLayout *layout, const char *name, int icon)
void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, const char *propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void uiItemFullR(uiLayout *layout, PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, const char *name, int icon, const char *placeholder=nullptr)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void UI_draw_roundbox_corner_set(int type)
void uiTemplateIDBrowse(uiLayout *layout, bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, const char *text=nullptr)
void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, const char *propname, bool expand)
void uiTemplateCryptoPicker(uiLayout *layout, PointerRNA *ptr, const char *propname, int icon)
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
void uiLayoutSetEmboss(uiLayout *layout, eUIEmbossType emboss)
void uiItemO(uiLayout *layout, const char *name, int icon, const char *opname)
void uiTemplateColorPicker(uiLayout *layout, PointerRNA *ptr, const char *propname, bool value_slider, bool lock, bool lock_luminosity, bool cubic)
void uiTemplateID(uiLayout *layout, const bContext *C, PointerRNA *ptr, const char *propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool live_icon=false, const char *text=nullptr)
uiLayout * uiLayoutColumn(uiLayout *layout, bool align)
uiLayout * uiLayoutSplit(uiLayout *layout, float percentage, bool align)
void uiItemR(uiLayout *layout, PointerRNA *ptr, const char *propname, eUI_Item_Flag flag, const char *name, int icon)
void uiTemplateComponentMenu(uiLayout *layout, PointerRNA *ptr, const char *propname, const char *name)
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, PointerRNA *ptr)
int UI_GetThemeValueType(int colorid, int spacetype)
void UI_GetThemeColor4fv(int colorid, float col[4])
float UI_view2d_scale_get_x(const View2D *v2d)
ATTR_WARN_UNUSED_RESULT const BMVert * v
bool skip_updating_sockets
Vector< SocketDeclaration * > inputs
void ED_node_sample_set(const float col[4])
#define NODELINK_GROUP_SIZE
void ED_init_standard_node_socket_type(blender::bke::bNodeSocketType *stype)
static float _sample_col[4]
void ED_init_custom_node_socket_type(blender::bke::bNodeSocketType *stype)
void ED_init_node_socket_type_virtual(blender::bke::bNodeSocketType *stype)
void ED_node_type_draw_color(const char *idname, float *r_color)
void ED_init_custom_node_type(blender::bke::bNodeType *)
void ED_node_draw_snap(View2D *v2d, const float cent[2], float size, NodeBorder border, uint pos)
void ED_node_init_butfuncs()
#define SAMPLE_FLT_ISNONE
draw_view in_light_buf[] float
ccl_device_inline float3 exp(float3 v)
bNodeSocketType NodeSocketTypeUndefined
bNodeSocketType * node_socket_type_find(const char *idname)
bNodeType NodeTypeUndefined
const bNodeInstanceKey NODE_INSTANCE_KEY_NONE
static void node_buts_rgb(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_texture_buts_bricks(uiLayout *layout, bContext *, PointerRNA *ptr)
static const float virtual_node_socket_color[4]
static void node_shader_buts_tex_environment_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_composit_buts_cryptomatte_legacy_ex(uiLayout *layout, bContext *, PointerRNA *)
static void node_shader_buts_scatter(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_socket_template_properties_update(blender::bke::bNodeType *ntype, blender::bke::bNodeSocketTemplate *stemp)
static void node_composit_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_composit_buts_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
void nodelink_batch_start(SpaceNode &)
static const float std_node_socket_colors[][4]
static void node_shader_buts_displacement(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_buts_frame_ex(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_buts_time(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_buts_curvevec(uiLayout *layout, bContext *, PointerRNA *ptr)
static void std_node_socket_interface_draw(ID *id, bNodeTreeInterfaceSocket *interface_socket, bContext *, uiLayout *layout)
static void std_node_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, const char *text)
GPUVertBufRaw dash_params_step
static float mute_expand_axis[3][2]
static void node_buts_math(uiLayout *layout, bContext *, PointerRNA *ptr)
static void calculate_inner_link_bezier_points(std::array< float2, 4 > &points)
static void node_texture_buts_proc(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_buts_combsep_color(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_texture_buts_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
static float2 socket_link_connection_location(const bNode &node, const bNodeSocket &socket, const bNodeLink &link)
static void node_composit_backdrop_boxmask(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
void node_draw_link_bezier(const bContext &C, const View2D &v2d, const SpaceNode &snode, const bNodeLink &link, const int th_col1, const int th_col2, const int th_col3, const bool selected)
static void node_composit_buts_ycc(uiLayout *layout, bContext *, PointerRNA *ptr)
bool all_links_muted(const bNodeSocket &socket)
void nodelink_batch_end(SpaceNode &snode)
static bool node_link_is_gizmo_link(const SpaceNode &snode, const bNodeLink &link)
std::array< float2, 4 > node_link_bezier_points_dragged(const SpaceNode &snode, const bNodeLink &link)
static float arrow_expand_axis[3][2]
GPUVertBufRaw has_back_link_step
void node_socket_color_get(const bContext &C, const bNodeTree &ntree, PointerRNA &node_ptr, const bNodeSocket &sock, float r_color[4])
static NodeLinkDrawConfig nodelink_get_draw_config(const bContext &C, const View2D &v2d, const SpaceNode &snode, const bNodeLink &link, const int th_col1, const int th_col2, const int th_col3, const bool selected)
void node_draw_link(const bContext &C, const View2D &v2d, const SpaceNode &snode, const bNodeLink &link, const bool selected)
static void nodelink_batch_reset()
static void draw_gizmo_pin_icon(uiLayout *layout, PointerRNA *socket_ptr)
gpu::Batch * batch_single
float2 node_link_calculate_multi_input_position(const float2 &socket_position, const int index, const int total_inputs)
static void node_draw_buttons_group(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void nodelink_batch_init()
static void node_buts_colorramp(uiLayout *layout, bContext *, PointerRNA *ptr)
void node_draw_link_dragged(const bContext &C, const View2D &v2d, const SpaceNode &snode, const bNodeLink &link)
static char nodelink_get_color_id(int th_col)
static void nodelink_batch_add_link(const SpaceNode &snode, const std::array< float2, 4 > &points, const NodeLinkDrawConfig &draw_config)
static void node_buts_output_shader(uiLayout *layout, bContext *, PointerRNA *ptr)
GPUVertBufRaw end_color_step
static void node_buts_curvefloat(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_buts_texture(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_composit_set_butfunc(blender::bke::bNodeType *ntype)
GPUVertBufRaw dim_factor_step
void draw_nodespace_back_pix(const bContext &C, ARegion ®ion, SpaceNode &snode, bNodeInstanceKey parent_key)
static void node_socket_undefined_draw_color_simple(const bke::bNodeSocketType *, float *r_color)
float node_link_dim_factor(const View2D &v2d, const bNodeLink &link)
static void node_texture_buts_output(uiLayout *layout, bContext *, PointerRNA *ptr)
GPUVertBufRaw thickness_step
static void node_shader_buts_tex_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void draw_node_socket_name_editable(uiLayout *layout, bNodeSocket *sock, const char *text)
static bool node_link_is_field_link(const SpaceNode &snode, const bNodeLink &link)
static void node_texture_buts_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
static const SocketColorFn std_node_socket_color_funcs[]
static float arrow_verts[3][2]
static std::array< float2, 4 > node_link_bezier_points(const bNodeLink &link)
static void node_composit_backdrop_ellipsemask(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
static void node_buts_mix_rgb(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_shader_buts_glossy(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_socket_undefined_interface_draw(ID *, bNodeTreeInterfaceSocket *, bContext *, uiLayout *layout)
static void std_node_socket_color_simple_fn(const bke::bNodeSocketType *type, float *r_color)
static bool node_link_draw_is_visible(const View2D &v2d, const std::array< float2, 4 > &points)
static void node_buts_image_views(uiLayout *layout, bContext *, PointerRNA *ptr, PointerRNA *imaptr)
void node_link_bezier_points_evaluated(const bNodeLink &link, std::array< float2, NODE_LINK_RESOL+1 > &coords)
static void node_composit_buts_cryptomatte(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_texture_buts_combsep_color(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_buts_value(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_file_output_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr)
static void node_socket_virtual_draw_color(bContext *, PointerRNA *, PointerRNA *, float *r_color)
static void nodelink_batch_draw(const SpaceNode &snode)
static struct blender::ed::space_node::@502 g_batch_link
static void node_draw_link_bezier_ex(const SpaceNode &snode, const NodeLinkDrawConfig &draw_config, const std::array< float2, 4 > &points)
static void node_texture_set_butfunc(blender::bke::bNodeType *ntype)
static void node_socket_undefined_draw_color(bContext *, PointerRNA *, PointerRNA *, float *r_color)
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)
NodeResizeDirection node_get_resize_direction(const SpaceNode &snode, const bNode *node, const int x, const int y)
void node_geometry_add_attribute_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, uiLayout &layout, const StringRefNull placeholder)
void std_node_socket_color_fn(bContext *, PointerRNA *, PointerRNA *, float *r_color)
static void node_composit_buts_huecorrect(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_shader_buts_tex_environment(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_buts_curvecol(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_common_set_butfunc(blender::bke::bNodeType *ntype)
static void node_socket_button_label(bContext *, uiLayout *layout, PointerRNA *, PointerRNA *, const char *text)
static void node_draw_link_end_marker(const float2 center, const float radius, const ColorTheme4f &color)
static void draw_node_socket_without_value(uiLayout *layout, bNodeSocket *sock, const char *text)
static void node_template_properties_update(blender::bke::bNodeType *ntype)
void(*)(bContext *C, PointerRNA *ptr, PointerRNA *node_ptr, float *r_color) SocketColorFn
GPUVertBufRaw start_color_step
static void set_nodelink_vertex(gpu::VertBuf *vbo, uint uv_id, uint pos_id, uint exp_id, uint v, const uchar uv[2], const float pos[2], const float exp[2])
static void node_composit_buts_cryptomatte_legacy(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_socket_virtual_draw_color_simple(const bke::bNodeSocketType *, float *r_color)
static void node_socket_undefined_draw(bContext *, uiLayout *layout, PointerRNA *, PointerRNA *, const char *)
static void node_composit_buts_combsep_color(uiLayout *layout, bContext *, PointerRNA *ptr)
static float mute_verts[3][2]
static void node_draw_link_end_markers(const bNodeLink &link, const NodeLinkDrawConfig &draw_config, const std::array< float2, 4 > &points, const bool outline)
static void node_buts_normal(uiLayout *layout, bContext *, PointerRNA *ptr)
static void node_shader_buts_tex_image(uiLayout *layout, bContext *C, PointerRNA *ptr)
static void node_property_update_default(Main *bmain, Scene *, PointerRNA *ptr)
static void node_shader_set_butfunc(blender::bke::bNodeType *ntype)
static bool socket_needs_attribute_search(bNode &node, bNodeSocket &socket)
T safe_divide(const T &a, const T &b)
T distance(const T &a, const T &b)
T min(const T &a, const T &b)
T interpolate(const T &a, const T &b, const FactorT &t)
T max(const T &a, const T &b)
bool is_builtin_gizmo_node(const bNode &node)
bool is_supported_value_node(const bNode &node)
bool socket_type_supports_fields(const eNodeSocketDatatype socket_type)
bool is_layer_selection_field(const bNodeTreeInterfaceSocket &socket)
#define NODE_RESIZE_MARGIN
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool RNA_property_enum_name(bContext *C, PointerRNA *ptr, PropertyRNA *prop, const int value, const char **r_name)
int RNA_property_enum_get(PointerRNA *ptr, PropertyRNA *prop)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_pointer_create(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
void RNA_def_property_update_runtime(PropertyRNA *prop, RNAPropertyUpdateFunc func)
SpaceNode_Runtime * runtime
struct bNodeTree * edittree
struct bNodeTree * nodetree
bNodeSocketRuntimeHandle * runtime
bNodeSocketTypeHandle * typeinfo
bNodeTreeRuntimeHandle * runtime
bNodeInstanceKey active_viewer_key
Compact definition of a node socket.
void(* draw_color)(bContext *C, PointerRNA *ptr, PointerRNA *node_ptr, float *r_color)
void(* draw_color_simple)(const bNodeSocketType *socket_type, float *r_color)
void(* interface_draw)(ID *id, bNodeTreeInterfaceSocket *socket, bContext *C, uiLayout *layout)
void(* draw)(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, const char *text)
bNodeSocketTemplate * inputs
void(* draw_backdrop)(SpaceNode *snode, ImBuf *backdrop, bNode *node, int x, int y)
void(* draw_buttons_ex)(uiLayout *, bContext *C, PointerRNA *ptr)
bNodeSocketTemplate * outputs
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
ColorTheme4f outline_color
void wmOrtho2_region_pixelspace(const ARegion *region)