51#include "RNA_prototypes.hh"
77#define DEFAULT_FLAGS UI_ITEM_R_SPLIT_EMPTY_NAME
128#define SAMPLE_FLT_ISNONE FLT_MAX
176 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) {
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);
512 uiTemplateID(layout,
C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
571 col->label(
IFACE_(
"Matte Objects:"), ICON_NONE);
584 layout->
op(
"NODE_OT_cryptomatte_layer_add",
IFACE_(
"Add Crypto Layer"), ICON_ADD);
585 layout->
op(
"NODE_OT_cryptomatte_layer_remove",
IFACE_(
"Remove Crypto Layer"), ICON_REMOVE);
605 ptr->owner_id, &RNA_ImageUser, &crypto->
iuser);
614 col->label(
IFACE_(
"Matte ID:"), ICON_NONE);
616 row = &
col->row(
true);
690 ID *
id =
ptr->owner_id;
701 row = &
col->row(
false);
707 row = &
col->row(
false);
710 row = &
col->row(
false);
712 row = &
col->row(
false);
714 row = &
col->row(
false);
724 row = &
col->row(
false);
727 row = &
col->row(
false);
735 row = &
col->row(
false);
738 row = &
col->row(
false);
745 row = &
col->row(
false);
747 row = &
col->row(
false);
765 col->prop(&tex_ptr,
"minkovsky_exponent",
DEFAULT_FLAGS, std::nullopt, ICON_NONE);
774 uiTemplateID(layout,
C,
ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
878 for (stemp = ntype->
inputs; stemp->
type >= 0; stemp++) {
883 for (stemp = ntype->
outputs; stemp->
type >= 0; stemp++) {
895 layout->
label(
IFACE_(
"Undefined Socket Type"), ICON_ERROR);
923 layout->
label(
IFACE_(
"Undefined Socket Type"), ICON_ERROR);
975 {0.63, 0.63, 0.63, 1.0},
976 {0.39, 0.39, 0.78, 1.0},
977 {0.78, 0.78, 0.16, 1.0},
978 {0.39, 0.78, 0.39, 1.0},
979 {0.80, 0.65, 0.84, 1.0},
980 {0.0, 0.0, 0.0, 0.0},
981 {0.35, 0.55, 0.36, 1.0},
982 {0.44, 0.70, 1.00, 1.0},
983 {0.93, 0.62, 0.36, 1.0},
984 {0.39, 0.22, 0.39, 1.0},
985 {0.00, 0.84, 0.64, 1.0},
986 {0.96, 0.96, 0.96, 1.0},
987 {0.62, 0.31, 0.64, 1.0},
988 {0.92, 0.46, 0.51, 1.0},
989 {0.65, 0.39, 0.78, 1.0},
990 {0.40, 0.40, 0.40, 1.0},
991 {0.72, 0.20, 0.52, 1.0},
992 {0.30, 0.50, 0.50, 1.0},
993 {0.50, 0.60, 0.40, 1.0},
1005template<
int socket_type>
1045 row = &layout->
row(
false);
1067 const char *imtype_name;
1073 row->
label(imtype_name, ICON_NONE);
1081 if (node_decl ==
nullptr) {
1091 return node_decl->
inputs[socket_index]->is_attribute_name;
1097 if (node_decl ==
nullptr) {
1107 return node_decl->
inputs[socket_index]->is_layer_name;
1119 if (sock->
runtime->declaration) {
1120 if (sock->
runtime->declaration->socket_name_rna) {
1122 layout->
prop((&sock->
runtime->declaration->socket_name_rna->owner),
1123 sock->
runtime->declaration->socket_name_rna->property_name,
1145 if (node->is_type(
"GeometryNodeMenuSwitch") && sock->index() > 0) {
1148 if (node->is_type(
"GeometryNodeSwitch")) {
1172 if (sock->is_inactive()) {
1182 const bool has_gizmo =
tree->runtime->gizmo_propagation ?
1183 tree->runtime->gizmo_propagation->gizmo_endpoint_sockets.contains(
1192 row->
label(
"", ICON_GIZMO);
1216 bool gizmo_handled =
false;
1239 gizmo_handled =
true;
1253 gizmo_handled =
true;
1264 if (
text.is_empty()) {
1276 if (
text.is_empty()) {
1286 if (
text.is_empty()) {
1296 if (
text.is_empty()) {
1318 if (default_value->
enum_items->items.is_empty()) {
1324 if (
const auto *menu_decl =
dynamic_cast<const nodes::decl::Menu *
>(socket_decl)) {
1325 if (menu_decl->is_expanded) {
1334 else if (default_value->has_conflict()) {
1338 layout->
label(
IFACE_(
"Menu Undefined"), ICON_QUESTION);
1352 text.is_empty() ? std::optional(label) : std::nullopt);
1358 if (
text.is_empty()) {
1359 uiTemplateID(layout,
C,
ptr,
"default_value",
"image.new",
"image.open",
nullptr);
1365 uiTemplateID(row,
C,
ptr,
"default_value",
"image.new",
"image.open",
nullptr);
1374 if (
text.is_empty()) {
1375 uiTemplateID(layout,
C,
ptr,
"default_value",
"texture.new",
nullptr,
nullptr);
1381 uiTemplateID(row,
C,
ptr,
"default_value",
"texture.new",
nullptr,
nullptr);
1391 if (has_gizmo && !gizmo_handled) {
1574 if (parent_key.
value != active_viewer_key.
value) {
1598 const float offset_x = snode.
xof + ima->
runtime->backdrop_offset[0] * snode.
zoom;
1599 const float offset_y = snode.
yof + ima->
runtime->backdrop_offset[1] * snode.
zoom;
1600 const float x = (region.
winx - snode.
zoom * ibuf->
x) / 2 + offset_x;
1601 const float y = (region.
winy - snode.
zoom * ibuf->
y) / 2 + offset_y;
1610 if (node->
typeinfo->draw_backdrop) {
1611 node->
typeinfo->draw_backdrop(&snode, ibuf, node,
x,
y);
1618 viewer_border->
xmin < viewer_border->
xmax && viewer_border->
ymin < viewer_border->
ymax)
1622 x + snode.
zoom * viewer_border->
xmin * ibuf->
x,
1623 x + snode.
zoom * viewer_border->
xmax * ibuf->
x,
1624 y + snode.
zoom * viewer_border->
ymin * ibuf->
y,
1625 y + snode.
zoom * viewer_border->
ymax * ibuf->
y);
1649 if (socket.is_multi_input() && socket.is_input() && !(node.
flag &
NODE_HIDDEN)) {
1655 return socket_location;
1672 const float clamp_factor =
math::min(1.0f, slope * (4.5f - 0.25f *
float(curving)));
1674 const float handle_offset = curving * 0.1f * dist_x * clamp_factor;
1676 points[1].x = points[0].x + handle_offset;
1677 points[1].y = points[0].y;
1679 points[2].x = points[3].x - handle_offset;
1680 points[2].y = points[3].y;
1686 std::array<float2, 4> points;
1705 std::array<float2, NODE_LINK_RESOL + 1> &coords)
1731#define MAX_SOCKET_PARAMETERS 4
1732#define MAX_SOCKET_INSTANCE 32
1743 return nodesocket_batch;
1827 const float color_inner[4],
1828 const float color_outline[4],
1829 const float outline_thickness,
1835 BLI_assert((color_inner !=
nullptr) && (color_outline !=
nullptr));
1838 socket_params.
rect[0] = rect->
xmin;
1839 socket_params.
rect[1] = rect->
xmax;
1840 socket_params.
rect[2] = rect->
ymin;
1841 socket_params.
rect[3] = rect->
ymax;
1852 socket_params.
shape = float(shape) + 0.1f;
1853 socket_params.
aspect = aspect;
1866#define NODELINK_GROUP_SIZE 256
1867#define LINK_RESOL 24
1868#define LINK_WIDTH 2.5f
1869#define ARROW_SIZE (7 * UI_SCALE_FAC)
1873static float arrow_verts[3][2] = {{-1.0f, 1.0f}, {0.0f, 0.0f}, {-1.0f, -1.0f}};
1875static float mute_verts[3][2] = {{0.7071f, 1.0f}, {0.7071f, 0.0f}, {0.7071f, -1.0f}};
1955 for (
int k = 0; k < 2; k++) {
1956 float uv[2] = {0.0f, 0.0f};
1957 float pos[2] = {0.0f, 0.0f};
1958 float exp[2] = {0.0f, 1.0f};
1982 for (
int i = 0;
i < 3;
i++) {
2001 for (
int i = 0;
i < 3; ++
i) {
2144 const std::array<float2, 4> &points,
2185 BLI_rctf_init(&rect, center.x - radius, center.x + radius, center.y - radius, center.y + radius);
2195 const std::array<float2, 4> &points,
2198 const float radius = (outline ? 0.65f : 0.45f) *
NODE_SOCKSIZE;
2233 return tree.runtime->sockets_on_active_gizmo_paths.contains(link.
fromsock) &&
2234 tree.runtime->sockets_on_active_gizmo_paths.contains(link.
tosock);
2244 const bool selected)
2248 draw_config.
th_col1 = th_col1;
2249 draw_config.
th_col2 = th_col2;
2250 draw_config.
th_col3 = th_col3;
2260 draw_config.
dash_factor = field_link ? 0.75f : 1.0f;
2266 (field_link ? 0.7f : 1.0f);
2280 &
const_cast<ID &
>(node_tree.
id), &RNA_Node, link.
fromnode);
2282 &
const_cast<ID &
>(node_tree.
id), &RNA_Node, link.
tonode);
2307 const float alpha = color_selected.
a;
2332 const std::array<float2, 4> &points)
2382 const bool selected)
2389 C, v2d, snode, link, th_col1, th_col2, th_col3, selected);
2398 const bool selected)
2436 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 CMP_NODE_VALTORGB
#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_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_OUTPUT_FILE
#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_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 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)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_ID_TEXTURE
@ NODE_INTERFACE_SOCKET_INPUT
@ NODE_DEFAULT_INPUT_VALUE
@ CMP_NODE_COMBSEP_COLOR_YCC
@ NODE_LINK_TEMP_HIGHLIGHT
@ NODE_LINK_INSERT_TARGET
@ NODE_LINK_INSERT_TARGET_INVALID
@ CMP_NODE_CRYPTOMATTE_SOURCE_RENDER
@ R_IMF_IMTYPE_MULTILAYER
@ 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)
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)
void GPU_batch_draw_instance_range(blender::gpu::Batch *batch, int instance_first, int instance_count)
#define GPU_batch_uniformbuf_bind(batch, name, ubo)
#define GPU_batch_uniform_4fv_array(batch, name, len, val)
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)
bool GPU_node_link_instancing_workaround()
void GPU_framebuffer_bind_no_srgb(GPUFrameBuffer *fb)
GPUFrameBuffer * GPU_framebuffer_active_get()
void GPU_framebuffer_restore()
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_2D_NODELINK_INST
@ GPU_SHADER_3D_UNIFORM_COLOR
@ GPU_SHADER_2D_NODE_SOCKET
@ GPU_SHADER_2D_NODE_SOCKET_INST
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)
void UI_draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4])
void UI_block_emboss_set(uiBlock *block, blender::ui::EmbossType emboss)
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 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 uiTemplateCurveMapping(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, int type, bool levels, bool brush, bool neg_slope, bool tone)
void uiTemplateCryptoPicker(uiLayout *layout, PointerRNA *ptr, blender::StringRefNull propname, int icon)
void uiLayoutSetContextPointer(uiLayout *layout, blender::StringRef name, PointerRNA *ptr)
void uiLayoutSetActive(uiLayout *layout, bool active)
void uiLayoutSetEnabled(uiLayout *layout, bool enabled)
uiBlock * uiLayoutGetBlock(uiLayout *layout)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void uiLayoutSetEmboss(uiLayout *layout, blender::ui::EmbossType emboss)
int UI_GetThemeValueType(int colorid, int spacetype)
void UI_GetThemeColor4fv(int colorid, float col[4])
float UI_view2d_scale_get_x(const View2D *v2d)
BMesh const char void * data
ATTR_WARN_UNUSED_RESULT const BMVert * v
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void append(const T &value)
bool skip_updating_sockets
Vector< SocketDeclaration * > inputs
std::unique_ptr< CustomSocketDrawFn > custom_draw_fn
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)
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_socket_button_label(bContext *, uiLayout *layout, PointerRNA *, PointerRNA *, const StringRefNull text)
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)
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)
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)
void nodelink_batch_end(SpaceNode &snode)
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 bool show_menu_socket_name(const bNode *node, const bNodeSocket *sock)
static float arrow_expand_axis[3][2]
GPUVertBufRaw has_back_link_step
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)
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 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_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 std_node_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr, StringRefNull text)
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_file_output_socket_draw(bContext *C, uiLayout *layout, PointerRNA *ptr, PointerRNA *node_ptr)
static struct blender::ed::space_node::@115050225201365207313130011241223120045130311177 g_batch_link
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)
NodeResizeDirection node_get_resize_direction(const SpaceNode &snode, const bNode *node, const int x, const int y)
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
GPUVertBufRaw start_color_step
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_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_socket_undefined_draw(bContext *, uiLayout *layout, PointerRNA *, PointerRNA *, StringRefNull)
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, 2 > float2
ColorTheme4< float > ColorTheme4f
VecBase< float, 3 > float3
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_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, StringRefNull 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
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, wmOperatorCallContext context, eUI_Item_Flag flag)
void label(blender::StringRef name, int icon)
uiLayout & column(bool align)
uiLayout & row(bool align)
uiLayout & split(float percentage, bool align)
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)