51#include "RNA_prototypes.hh"
78#define DEFAULT_FLAGS UI_ITEM_R_SPLIT_EMPTY_NAME
129#define SAMPLE_FLT_ISNONE FLT_MAX
177 short multi = (node->
id && ((
Tex *)node->
id)->use_nodes &&
206 if (node->is_frame()) {
237 bounds.xmin = node->
runtime->draw_bounds.xmax - 1.0f *
U.widget_unit;
290 const bool show_layer_selection,
291 const bool show_color_management)
313 layout->
label(numstr, ICON_NONE);
332 if (show_color_management) {
344 split->active_set(!is_data);
349 split->enabled_set(
false);
360 uiTemplateID(layout,
C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
388 uiTemplateID(layout,
C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
511 uiTemplateID(layout,
C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
565 col->label(
IFACE_(
"Matte Objects:"), ICON_NONE);
578 layout->
op(
"NODE_OT_cryptomatte_layer_add",
IFACE_(
"Add Crypto Layer"), ICON_ADD);
579 layout->
op(
"NODE_OT_cryptomatte_layer_remove",
IFACE_(
"Remove Crypto Layer"), ICON_REMOVE);
599 ptr->owner_id, &RNA_ImageUser, &crypto->
iuser);
608 col->label(
IFACE_(
"Matte ID:"), ICON_NONE);
610 row = &
col->row(
true);
668 ID *
id =
ptr->owner_id;
679 row = &
col->row(
false);
685 row = &
col->row(
false);
688 row = &
col->row(
false);
690 row = &
col->row(
false);
692 row = &
col->row(
false);
702 row = &
col->row(
false);
705 row = &
col->row(
false);
713 row = &
col->row(
false);
716 row = &
col->row(
false);
723 row = &
col->row(
false);
725 row = &
col->row(
false);
743 col->prop(&tex_ptr,
"minkovsky_exponent",
DEFAULT_FLAGS, std::nullopt, ICON_NONE);
752 uiTemplateID(layout,
C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
856 for (stemp = ntype->
inputs; stemp->
type >= 0; stemp++) {
861 for (stemp = ntype->
outputs; stemp->
type >= 0; stemp++) {
873 layout->
label(
IFACE_(
"Undefined Socket Type"), ICON_ERROR);
901 layout->
label(
IFACE_(
"Undefined Socket Type"), ICON_ERROR);
953 {0.63, 0.63, 0.63, 1.0},
954 {0.39, 0.39, 0.78, 1.0},
955 {0.78, 0.78, 0.16, 1.0},
956 {0.39, 0.78, 0.39, 1.0},
957 {0.80, 0.65, 0.84, 1.0},
958 {0.0, 0.0, 0.0, 0.0},
959 {0.35, 0.55, 0.36, 1.0},
960 {0.44, 0.70, 1.00, 1.0},
961 {0.93, 0.62, 0.36, 1.0},
962 {0.39, 0.22, 0.39, 1.0},
963 {0.00, 0.84, 0.64, 1.0},
964 {0.96, 0.96, 0.96, 1.0},
965 {0.62, 0.31, 0.64, 1.0},
966 {0.92, 0.46, 0.51, 1.0},
967 {0.65, 0.39, 0.78, 1.0},
968 {0.40, 0.40, 0.40, 1.0},
969 {0.72, 0.20, 0.52, 1.0},
970 {0.30, 0.50, 0.50, 1.0},
971 {0.49, 0.49, 0.23, 1.0},
983template<
int socket_type>
1014 if (node_decl ==
nullptr) {
1023 return socket.
runtime->declaration->is_attribute_name;
1029 if (node_decl ==
nullptr) {
1038 return socket.
runtime->declaration->is_layer_name;
1044 if (node_decl ==
nullptr) {
1053 return socket.
runtime->declaration->is_volume_grid_name;
1065 if (sock->
runtime->declaration) {
1066 if (sock->
runtime->declaration->socket_name_rna) {
1069 layout->
prop((&sock->
runtime->declaration->socket_name_rna->owner),
1070 sock->
runtime->declaration->socket_name_rna->property_name,
1098 if (sock->is_inactive()) {
1103 const StringRef label_or_empty = optional_label ?
"" : label;
1105 const bool has_gizmo =
tree->runtime->gizmo_propagation ?
1106 tree->runtime->gizmo_propagation->gizmo_endpoint_sockets.contains(
1115 row->
label(
"", ICON_GIZMO);
1142 bool gizmo_handled =
false;
1151 if (socket_decl && socket_decl->
compact) {
1165 gizmo_handled =
true;
1179 gizmo_handled =
true;
1190 if (optional_label) {
1196 label_layout->
label(label, ICON_NONE);
1200 if (sock->is_inactive()) {
1210 if (optional_label) {
1215 row->
label(label, ICON_NONE);
1220 if (optional_label) {
1225 row->
label(label, ICON_NONE);
1230 if (optional_label) {
1235 row->
label(label, ICON_NONE);
1240 if (optional_label) {
1252 row->
label(label, ICON_NONE);
1262 if (default_value->
enum_items->items.is_empty()) {
1264 row->
label(label, ICON_NONE);
1268 bool expanded =
false;
1269 if (
const auto *menu_decl =
dynamic_cast<const nodes::decl::Menu *
>(socket_decl)) {
1270 expanded = menu_decl->is_expanded;
1272 if (optional_label) {
1284 row.
label(label, ICON_NONE);
1296 else if (default_value->has_conflict()) {
1300 layout->
label(
IFACE_(
"Menu Undefined"), ICON_QUESTION);
1307 if (optional_label) {
1315 std::optional(label));
1332 if (optional_label) {
1333 uiTemplateID(layout,
C,
ptr,
"default_value",
"image.new",
"image.open",
nullptr);
1338 row->
label(label, ICON_NONE);
1339 uiTemplateID(row,
C,
ptr,
"default_value",
"image.new",
"image.open",
nullptr);
1348 if (optional_label) {
1349 uiTemplateID(layout,
C,
ptr,
"default_value",
"texture.new",
nullptr,
nullptr);
1354 row->
label(label, ICON_NONE);
1355 uiTemplateID(row,
C,
ptr,
"default_value",
"texture.new",
nullptr,
nullptr);
1365 if (has_gizmo && !gizmo_handled) {
1553 if (parent_key.
value != active_viewer_key.
value) {
1577 const float offset_x = snode.
xof + ima->
runtime->backdrop_offset[0] * snode.
zoom;
1578 const float offset_y = snode.
yof + ima->
runtime->backdrop_offset[1] * snode.
zoom;
1579 const float x = (region.
winx - snode.
zoom * ibuf->
x) / 2 + offset_x;
1580 const float y = (region.
winy - snode.
zoom * ibuf->
y) / 2 + offset_y;
1589 if (node->
typeinfo->draw_backdrop) {
1590 node->
typeinfo->draw_backdrop(&snode, ibuf, node,
x,
y);
1597 viewer_border->
xmin < viewer_border->
xmax && viewer_border->
ymin < viewer_border->
ymax)
1601 x + snode.
zoom * viewer_border->
xmin * ibuf->
x,
1602 x + snode.
zoom * viewer_border->
xmax * ibuf->
x,
1603 y + snode.
zoom * viewer_border->
ymin * ibuf->
y,
1604 y + snode.
zoom * viewer_border->
ymax * ibuf->
y);
1634 return socket_location;
1651 const float clamp_factor =
math::min(1.0f, slope * (4.5f - 0.25f *
float(curving)));
1653 const float handle_offset = curving * 0.1f * dist_x * clamp_factor;
1655 points[1].x = points[0].x + handle_offset;
1656 points[1].y = points[0].y;
1658 points[2].x = points[3].x - handle_offset;
1659 points[2].y = points[3].y;
1665 std::array<float2, 4> points;
1684 std::array<float2, NODE_LINK_RESOL + 1> &coords)
1710#define MAX_SOCKET_PARAMETERS 4
1711#define MAX_SOCKET_INSTANCE 32
1722 return nodesocket_batch;
1806 const float color_inner[4],
1807 const float color_outline[4],
1808 const float outline_thickness,
1814 BLI_assert((color_inner !=
nullptr) && (color_outline !=
nullptr));
1817 socket_params.
rect[0] = rect->
xmin;
1818 socket_params.
rect[1] = rect->
xmax;
1819 socket_params.
rect[2] = rect->
ymin;
1820 socket_params.
rect[3] = rect->
ymax;
1832 socket_params.
aspect = aspect;
1845#define NODELINK_GROUP_SIZE 256
1846#define LINK_RESOL 24
1847#define LINK_WIDTH 2.5f
1848#define ARROW_SIZE (7 * UI_SCALE_FAC)
1852static float arrow_verts[3][2] = {{-1.0f, 1.0f}, {0.0f, 0.0f}, {-1.0f, -1.0f}};
1854static 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 float uv[2] = {0.0f, 0.0f};
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) {
2010 sizeof(node_link_data), &node_link_data, __func__);
2061 const std::array<float2, 4> &points,
2072 data.bezier_P0 = points[0];
2073 data.bezier_P1 = points[1];
2074 data.bezier_P2 = points[2];
2075 data.bezier_P3 = points[3];
2077 char *colid =
reinterpret_cast<char *
>(&
data.color_ids);
2103 BLI_rctf_init(&rect, center.x - radius, center.x + radius, center.y - radius, center.y + radius);
2113 const std::array<float2, 4> &points,
2116 const float radius = (outline ? 0.65f : 0.45f) *
NODE_SOCKSIZE;
2148 return tree.runtime->sockets_on_active_gizmo_paths.contains(link.
fromsock) &&
2149 tree.runtime->sockets_on_active_gizmo_paths.contains(link.
tosock);
2159 const bool selected)
2163 draw_config.
th_col1 = th_col1;
2164 draw_config.
th_col2 = th_col2;
2165 draw_config.
th_col3 = th_col3;
2175 draw_config.
dash_factor = field_link ? 0.75f : 1.0f;
2181 (field_link ? 0.7f : 1.0f);
2195 &
const_cast<ID &
>(node_tree.
id), &RNA_Node, link.
fromnode);
2197 &
const_cast<ID &
>(node_tree.
id), &RNA_Node, link.
tonode);
2222 const float alpha = color_selected.
a;
2247 const std::array<float2, 4> &points)
2272 const bool selected)
2279 C, v2d, snode, link, th_col1, th_col2, th_col3, selected);
2288 const bool selected)
2326 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)
void BKE_main_ensure_invariants(Main &bmain, std::optional< blender::Span< ID * > > modified_ids=std::nullopt)
#define SH_NODE_COMBINE_COLOR
#define SH_NODE_MIX_RGB_LEGACY
#define SH_NODE_CURVE_FLOAT
#define SH_NODE_OUTPUT_WORLD
#define SH_NODE_TEX_IMAGE
#define TEX_NODE_PROC_MAX
#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 TEX_NODE_CURVE_TIME
#define SH_NODE_DISPLACEMENT
#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()
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_UTF8(dst, format,...)
void BLI_thread_unlock(int type)
void BLI_thread_lock(int type)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_ID_TEXTURE
@ NODE_INTERFACE_SOCKET_INPUT
@ NODE_DEFAULT_INPUT_VALUE
@ CMP_NODE_COMBSEP_COLOR_YCC
@ CMP_NODE_CRYPTOMATTE_SOURCE_RENDER
@ NODE_LINK_TEMP_HIGHLIGHT
@ NODE_LINK_INSERT_TARGET
@ NODE_LINK_INSERT_TARGET_INVALID
@ SOCK_DISPLAY_SHAPE_LIST
@ SOCK_DISPLAY_SHAPE_VOLUME_GRID
@ SN_OVERLAY_SHOW_WIRE_COLORS
@ SN_OVERLAY_SHOW_OVERLAYS
void DRW_draw_view(const bContext *C)
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
static void split(const char *text, const char *seps, char ***str, int *count)
void GPU_batch_draw_instance_range(blender::gpu::Batch *batch, int instance_first, int instance_count)
#define GPU_batch_uniformbuf_bind(batch, name, ubo)
void GPU_batch_program_set_builtin(blender::gpu::Batch *batch, GPUBuiltinShader shader_id)
#define GPU_batch_uniform_4fv_array(batch, name, len, val)
blender::gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, blender::gpu::VertBuf *vertex_buf, blender::gpu::IndexBuf *index_buf, GPUBatchFlag owns_flag)
void GPU_batch_draw(blender::gpu::Batch *batch)
void gpu_batch_presets_register(blender::gpu::Batch *preset_batch)
void gpu_batch_storage_buffer_register(blender::gpu::StorageBuf *preset_buffer)
void GPU_framebuffer_restore()
void GPU_framebuffer_bind_no_srgb(blender::gpu::FrameBuffer *fb)
blender::gpu::FrameBuffer * GPU_framebuffer_active_get()
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
blender::gpu::IndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
void GPU_indexbuf_add_tri_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3)
void GPU_matrix_identity_set()
void GPU_matrix_push_projection()
void GPU_matrix_pop_projection()
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_2D_NODE_SOCKET
@ GPU_SHADER_2D_NODE_SOCKET_INST
void GPU_blend(GPUBlend blend)
void GPU_depth_test(GPUDepthTest test)
void GPU_storagebuf_update(blender::gpu::StorageBuf *ssbo, const void *data)
void GPU_storagebuf_bind(blender::gpu::StorageBuf *ssbo, int slot)
#define GPU_storagebuf_create(size)
blender::gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
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)
void UI_draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4])
void uiTemplateComponentMenu(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, blender::StringRef name)
void UI_draw_roundbox_corner_set(int type)
void uiTemplateColorRamp(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, bool expand)
void uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, int type, bool levels, bool brush, bool neg_slope, bool tone, bool presets)
void uiTemplateID(uiLayout *layout, const bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, bool live_icon=false, std::optional< blender::StringRef > text=std::nullopt)
void uiTemplateIDBrowse(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, const char *newop, const char *openop, const char *unlinkop, int filter=UI_TEMPLATE_ID_FILTER_ALL, const char *text=nullptr)
void uiTemplateImage(uiLayout *layout, bContext *C, PointerRNA *ptr, blender::StringRefNull propname, PointerRNA *userptr, bool compact, bool multiview)
void uiTemplateCryptoPicker(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, int icon)
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
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void append(const T &value)
constexpr bool is_empty() const
bool skip_updating_sockets
void ED_node_sample_set(const float col[4])
#define MAX_SOCKET_PARAMETERS
#define NODELINK_GROUP_SIZE
void ED_init_standard_node_socket_type(blender::bke::bNodeSocketType *stype)
#define MAX_SOCKET_INSTANCE
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_init_butfuncs()
#define SAMPLE_FLT_ISNONE
bNodeSocketType NodeSocketTypeUndefined
Span< bNodeType * > node_types_get()
bNodeType NodeTypeUndefined
bNodeSocketType * node_socket_type_find(StringRef idname)
const bNodeInstanceKey NODE_INSTANCE_KEY_NONE
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)
NodeLinkData data[NODELINK_GROUP_SIZE]
static void node_composit_buts_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
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 bool socket_needs_volume_grid_search(const bNode &node, const bNodeSocket &socket)
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)
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)
gpu::StorageBuf * link_buf
void nodesocket_batch_start()
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]
static struct blender::ed::space_node::@355314271107322122265366121241003211321003121362 g_batch_link
void node_geometry_add_layer_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, uiLayout &layout, const StringRef placeholder)
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_node_socket_batch(const NodeSocketShaderParameters &socket_params)
static void draw_gizmo_pin_icon(uiLayout *layout, PointerRNA *socket_ptr)
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_socket_undefined_draw(bContext *, uiLayout *layout, PointerRNA *, PointerRNA *, StringRef)
static bool socket_needs_layer_search(const bNode &node, const bNodeSocket &socket)
static void node_buts_colorramp(uiLayout *layout, bContext *, PointerRNA *ptr)
void std_node_socket_colors_get(int socket_type, float *r_color)
static GBatchNodesocket & g_batch_nodesocket()
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 draw_node_socket_without_value(uiLayout *layout, bNodeSocket *sock, const StringRef text)
static void nodelink_batch_add_link(const SpaceNode &snode, const std::array< float2, 4 > &points, const NodeLinkDrawConfig &draw_config)
static void node_socket_button_label(bContext *, uiLayout *layout, PointerRNA *, PointerRNA *, const StringRef text)
static void node_buts_output_shader(uiLayout *layout, bContext *, PointerRNA *ptr)
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)
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)
static void node_shader_buts_tex_image_ex(uiLayout *layout, bContext *C, PointerRNA *ptr)
static bool node_link_is_field_link(const SpaceNode &snode, const bNodeLink &link)
void node_geometry_add_attribute_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, uiLayout &layout, const StringRef placeholder)
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_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)
void nodesocket_batch_end()
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 nodesocket_cache_flush()
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_socket_virtual_draw_color(bContext *, PointerRNA *, PointerRNA *, float *r_color)
static void nodelink_batch_draw(const SpaceNode &snode)
float2 socket_link_connection_location(const bNode &node, const bNodeSocket &socket, const bNodeLink &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)
static void std_node_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, StringRef label)
NodeResizeDirection node_get_resize_direction(const SpaceNode &snode, const bNode *node, const int x, const int y)
void nodelink_batch_end(const SpaceNode &snode)
void nodelink_batch_start(const SpaceNode &)
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_draw_link_end_marker(const float2 center, const float radius, const ColorTheme4f &color)
static void node_template_properties_update(blender::bke::bNodeType *ntype)
void(*)(bContext *C, PointerRNA *ptr, PointerRNA *node_ptr, float *r_color) SocketColorFn
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)
void node_geometry_add_volume_grid_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, uiLayout &layout, const StringRef placeholder)
static void node_composit_buts_combsep_color(uiLayout *layout, bContext *, PointerRNA *ptr)
static float mute_verts[3][2]
static void draw_node_socket_name_editable(uiLayout *layout, bNodeSocket *sock, const StringRef text)
void node_draw_nodesocket(const rctf *rect, const float color_inner[4], const float color_outline[4], float outline_thickness, int shape, float aspect)
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 gpu::Batch * nodesocket_batch_init()
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 void set_nodelink_vertex(gpu::VertBuf *vbo, uint uv_id, uint pos_id, uint exp_id, uint v, const float uv[2], const float pos[2], const float exp[2])
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 socket_type_supports_fields(const eNodeSocketDatatype socket_type)
bool socket_type_supports_grids(const eNodeSocketDatatype socket_type)
VecBase< float, 4 > float4
VecBase< float, 2 > float2
ColorTheme4< float > ColorTheme4f
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_boolean_get(PointerRNA *ptr, const char *name)
PointerRNA RNA_pointer_create_discrete(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)
ColorManagedColorspaceSettings colorspace_settings
ImageRuntimeHandle * runtime
SpaceNode_Runtime * runtime
struct bNodeTree * edittree
struct bNodeTree * nodetree
bNodeSocketRuntimeHandle * runtime
bNodeSocketTypeHandle * typeinfo
bNodeInstanceKey active_viewer_key
bNodeTypeHandle * typeinfo
bNodeRuntimeHandle * runtime
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, StringRef text)
bNodeSocketTemplate * inputs
void(* draw_buttons_ex)(uiLayout *, bContext *C, PointerRNA *ptr)
bNodeSocketTemplate * outputs
void(* draw_buttons)(uiLayout *, bContext *C, PointerRNA *ptr)
Vector< NodeSocketShaderParameters, MAX_SOCKET_INSTANCE > params
ColorTheme4f outline_color
void alignment_set(blender::ui::LayoutAlign alignment)
void label(blender::StringRef name, int icon)
uiLayout & column(bool align)
void active_set(bool active)
void context_ptr_set(blender::StringRef name, const PointerRNA *ptr)
uiLayout & row(bool align)
uiLayout & split(float percentage, bool align)
void emboss_set(blender::ui::EmbossType emboss)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< blender::StringRef > name_opt, int icon, std::optional< blender::StringRef > placeholder=std::nullopt)
void wmOrtho2_region_pixelspace(const ARegion *region)