50#include "RNA_prototypes.hh"
78#define DEFAULT_FLAGS ui::ITEM_R_SPLIT_EMPTY_NAME
115 template_curve_mapping(&layout, ptr,
"curve",
's',
false,
false,
false,
false,
false);
120 template_color_ramp(&layout, ptr,
"color_ramp",
false);
125 template_curve_mapping(&layout, ptr,
"mapping",
'v',
false,
false,
false,
false,
false);
130 template_curve_mapping(&layout, ptr,
"mapping", 0,
false,
false,
false,
false,
false);
135#define SAMPLE_FLT_ISNONE FLT_MAX
148namespace ed::space_node {
165 template_curve_mapping(
166 &layout, ptr,
"mapping",
'c',
false,
false,
false, (ntree->
type ==
NTREE_COMPOSIT),
false);
183 short multi = (
node->id && (id_cast<Tex *>(
node->id))->use_nodes &&
186 template_id(&layout,
C, ptr,
"texture",
"texture.new",
nullptr,
nullptr);
218 (node_is_collapsed ? 3.0f : 1.0f);
220 if (
node->is_frame()) {
257 if (node_is_collapsed) {
260 (
x > (
bounds.xmin + 0.4f *
U.widget_unit)))
277 template_id_browse(&layout,
C, ptr,
"node_tree",
nullptr,
nullptr,
nullptr);
310 const bool show_layer_selection,
311 const bool show_color_management)
333 layout.
label(numstr, ICON_NONE);
352 if (show_color_management) {
356 split.prop_with_menu(&colorspace_settings_ptr,
361 "UI_MT_color_space_select");
374 split.enabled_set(
false);
385 template_id(&layout,
C, ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
413 template_id(&layout,
C, ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
538 template_id(&layout,
C, ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
572 template_curve_mapping(&layout, ptr,
"mapping",
'h',
false,
false,
false,
false,
false);
595 template_crypto_picker(&row, ptr,
"add", ICON_ADD);
596 template_crypto_picker(&row, ptr,
"remove", ICON_REMOVE);
605 layout.
op(
"NODE_OT_cryptomatte_layer_add",
IFACE_(
"Add Crypto Layer"), ICON_ADD);
606 layout.
op(
"NODE_OT_cryptomatte_layer_remove",
IFACE_(
"Remove Crypto Layer"), ICON_REMOVE);
618 template_id(&col,
C, ptr,
"scene",
nullptr,
nullptr,
nullptr);
621 template_id(&col,
C, ptr,
"image",
nullptr,
"IMAGE_OT_open",
nullptr);
639 template_crypto_picker(&row_2, ptr,
"add", ICON_ADD);
640 template_crypto_picker(&row_2, ptr,
"remove", ICON_REMOVE);
803 col.
prop(&tex_ptr,
"minkovsky_exponent",
DEFAULT_FLAGS, std::nullopt, ICON_NONE);
816 template_id(&layout,
C, ptr,
"image",
"IMAGE_OT_new",
"IMAGE_OT_open",
nullptr);
922 for (stemp = ntype->
inputs; stemp->
type >= 0; stemp++) {
927 for (stemp = ntype->
outputs; stemp->
type >= 0; stemp++) {
939 layout->
label(
IFACE_(
"Undefined Socket Type"), ICON_STATUS_ERROR);
967 layout->
label(
IFACE_(
"Undefined Socket Type"), ICON_STATUS_ERROR);
1029 {0.63, 0.63, 0.63, 1.0},
1030 {0.39, 0.39, 0.78, 1.0},
1031 {0.78, 0.78, 0.16, 1.0},
1032 {0.39, 0.78, 0.39, 1.0},
1033 {0.80, 0.65, 0.84, 1.0},
1034 {0.0, 0.0, 0.0, 0.0},
1035 {0.35, 0.55, 0.36, 1.0},
1036 {0.44, 0.70, 1.00, 1.0},
1037 {0.93, 0.62, 0.36, 1.0},
1038 {0.39, 0.22, 0.39, 1.0},
1039 {0.00, 0.84, 0.64, 1.0},
1040 {0.96, 0.96, 0.96, 1.0},
1041 {0.62, 0.31, 0.64, 1.0},
1042 {0.92, 0.46, 0.51, 1.0},
1043 {0.65, 0.39, 0.78, 1.0},
1044 {0.40, 0.40, 0.40, 1.0},
1045 {0.72, 0.20, 0.52, 1.0},
1046 {0.30, 0.50, 0.50, 1.0},
1047 {0.49, 0.49, 0.23, 1.0},
1048 {0.39, 0.34, 0.26, 1},
1052 {0.39, 0.34, 0.26, 1},
1053 {0.36, 0.47, 0.61, 1.0},
1065template<
int socket_type>
1105 if (node_decl ==
nullptr) {
1120 if (node_decl ==
nullptr) {
1135 if (node_decl ==
nullptr) {
1152 if (
node.is_type(
"NodeGetNestedBundlePaths"_ustr)) {
1201 if (sock->is_inactive()) {
1206 const StringRef label_or_empty = optional_label ?
"" : label;
1218 row.
label(
"", ICON_GIZMO);
1245 bool gizmo_handled =
false;
1254 if (socket_decl && socket_decl->
compact) {
1255 template_component_menu(layout, ptr,
"default_value", label_or_empty);
1265 if (!optional_label) {
1270 gizmo_handled =
true;
1278 if (socket_decl && socket_decl->
compact) {
1279 template_component_menu(layout, ptr,
"default_value", label_or_empty);
1285 if (!optional_label) {
1296 if (!optional_label) {
1301 gizmo_handled =
true;
1312 if (optional_label) {
1318 label_layout->
label(label, ICON_NONE);
1322 if (sock->is_inactive()) {
1332 if (optional_label) {
1337 row->
label(label, ICON_NONE);
1342 if (optional_label) {
1347 row->
label(label, ICON_NONE);
1352 if (optional_label) {
1357 row->
label(label, ICON_NONE);
1362 if (optional_label) {
1367 row->
label(label, ICON_NONE);
1372 if (optional_label) {
1384 row->
label(label, ICON_NONE);
1396 row->
label(label, ICON_NONE);
1400 bool expanded =
false;
1401 if (
const auto *menu_decl =
dynamic_cast<const nodes::decl::Menu *
>(socket_decl)) {
1402 expanded = menu_decl->is_expanded;
1404 if (optional_label) {
1416 row.
label(label, ICON_NONE);
1428 else if (default_value->has_conflict()) {
1429 layout->
label(
IFACE_(
"Menu Error"), ICON_STATUS_ERROR);
1432 layout->
label(
IFACE_(
"Menu Undefined"), ICON_QUESTION);
1442 if (optional_label) {
1450 std::optional(label));
1464 if (optional_label) {
1465 template_id(layout,
C, ptr,
"default_value",
nullptr,
"SOUND_OT_open",
nullptr);
1470 row->
label(label, ICON_NONE);
1471 template_id(row,
C, ptr,
"default_value",
nullptr,
"SOUND_OT_open",
nullptr);
1476 if (optional_label) {
1477 template_id(layout,
C, ptr,
"default_value",
nullptr,
"FONT_OT_open",
"FONT_OT_unlink");
1482 row->
label(label, ICON_NONE);
1483 template_id(row,
C, ptr,
"default_value",
nullptr,
"FONT_OT_open",
"FONT_OT_unlink");
1490 if (optional_label) {
1491 template_id(layout,
C, ptr,
"default_value",
"image.new",
"image.open",
nullptr);
1496 row->
label(label, ICON_NONE);
1497 template_id(row,
C, ptr,
"default_value",
"image.new",
"image.open",
nullptr);
1506 if (optional_label) {
1507 template_id(layout,
C, ptr,
"default_value",
"texture.new",
nullptr,
nullptr);
1512 row->
label(label, ICON_NONE);
1513 template_id(row,
C, ptr,
"default_value",
"texture.new",
nullptr,
nullptr);
1523 if (has_gizmo && !gizmo_handled) {
1622 col = &layout->
column(
false);
1647 col->
prop(&ptr,
"layer_selection_field",
DEFAULT_FLAGS, std::nullopt, ICON_NONE);
1752 if (parent_key.
value != active_viewer_key.
value) {
1779 const float offset_x = snode.
xof + offset.x * snode.
zoom;
1780 const float offset_y = snode.
yof + offset.y * snode.
zoom;
1781 const float x = (region.
winx - snode.
zoom * ibuf->
x) / 2 + offset_x;
1782 const float y = (region.
winy - snode.
zoom * ibuf->
y) / 2 + offset_y;
1789 if (
node->is_selected()) {
1790 if (
node->typeinfo->draw_backdrop) {
1791 node->typeinfo->draw_backdrop(&snode, ibuf,
node,
x,
y);
1815 return socket_location;
1832 const float clamp_factor =
math::min(1.0f, slope * (4.5f - 0.25f *
float(curving)));
1834 const float handle_offset = curving * 0.1f * dist_x * clamp_factor;
1836 points[1].x = points[0].x + handle_offset;
1837 points[1].y = points[0].y;
1839 points[2].x = points[3].x - handle_offset;
1840 points[2].y = points[3].y;
1846 std::array<float2, 4> points;
1855 if (std::min({points[0].x, points[1].x, points[2].x, points[3].x}) > v2d.
cur.
xmax) {
1858 if (std::max({points[0].x, points[1].x, points[2].x, points[3].x}) < v2d.
cur.
xmin) {
1865 std::array<float2, NODE_LINK_RESOL + 1> &coords)
1893#define MAX_SOCKET_PARAMETERS 4
1894#define MAX_SOCKET_INSTANCE 32
1905 return nodesocket_batch;
1989 const float color_inner[4],
1990 const float color_outline[4],
1991 const float outline_thickness,
1997 BLI_assert((color_inner !=
nullptr) && (color_outline !=
nullptr));
2000 socket_params.
rect[0] = rect->
xmin;
2001 socket_params.
rect[1] = rect->
xmax;
2002 socket_params.
rect[2] = rect->
ymin;
2003 socket_params.
rect[3] = rect->
ymax;
2015 socket_params.
aspect = aspect;
2028#define NODELINK_GROUP_SIZE 256
2029#define LINK_RESOL 24
2030#define LINK_WIDTH 2.5f
2031#define ARROW_SIZE (7 * UI_SCALE_FAC)
2035static float arrow_verts[3][2] = {{-1.0f, 1.0f}, {0.0f, 0.0f}, {-1.0f, -1.0f}};
2037static float mute_verts[3][2] = {{0.7071f, 1.0f}, {0.7071f, 0.0f}, {0.7071f, -1.0f}};
2085 for (
int k = 0; k < 2; k++) {
2086 float uv[2] = {0.0f, 0.0f};
2087 float pos[2] = {0.0f, 0.0f};
2088 float exp[2] = {0.0f, 1.0f};
2112 for (
int i = 0; i < 3; i++) {
2131 for (
int i = 0; i < 3; ++i) {
2191 float alert_color[4];
2193 alert_color[3] = std::min(alert_color[3] + 0.6f, 0.8f);
2201 sizeof(node_link_data), &node_link_data, __func__);
2252 const std::array<float2, 4> &points,
2263 data.bezier_P0 = points[0];
2264 data.bezier_P1 = points[1];
2265 data.bezier_P2 = points[2];
2266 data.bezier_P3 = points[3];
2268 char *colid =
reinterpret_cast<char *
>(&
data.color_ids);
2294 BLI_rctf_init(&rect, center.x - radius, center.x + radius, center.y - radius, center.y + radius);
2304 const std::array<float2, 4> &points,
2307 const float radius = (outline ? 0.65f : 0.45f) *
NODE_SOCKSIZE;
2332 if (!link.
fromsock->may_be_field()) {
2358 const bool selected)
2362 draw_config.
th_col1 = th_col1;
2363 draw_config.
th_col2 = th_col2;
2364 draw_config.
th_col3 = th_col3;
2374 draw_config.
dash_factor = field_link ? 0.75f : 1.0f;
2380 (field_link ? 0.7f : 1.0f);
2394 &
const_cast<ID &
>(node_tree.
id), RNA_Node, link.
fromnode);
2396 &
const_cast<ID &
>(node_tree.
id), RNA_Node, link.
tonode);
2423 const float alpha = color_selected.
a;
2448 const std::array<float2, 4> &points)
2473 const bool selected)
2480 C, v2d, snode, link, th_col1, th_col2, th_col3, selected);
2489 const bool selected)
2527 std::array<float2, 4> points;
#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 NODE_COMBINE_BUNDLE
#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
#define SNPRINTF_UTF8(dst, format,...)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_ID_TEXTURE
#define REGION_DRAW_BACKDROP
#define GPU_batch_uniformbuf_bind(batch, name, ubo)
#define GPU_batch_uniform_4fv_array(batch, name, len, val)
#define GPU_storagebuf_create(size)
#define BLI_assert_unreachable()
const nodes::SocketDeclaration * declaration
std::unique_ptr< nodes::gizmos::TreeGizmoPropagation > gizmo_propagation
Set< const bNodeSocket * > sockets_on_active_gizmo_paths
constexpr bool is_empty() const
static BundleKey type_item_name
bool skip_updating_sockets
std::unique_ptr< SocketNameRNA > socket_name_rna
#define MAX_SOCKET_PARAMETERS
#define NODELINK_GROUP_SIZE
#define MAX_SOCKET_INSTANCE
#define SAMPLE_FLT_ISNONE
#define storage(slot, qualifiers)
float3x3 scale(float3x3 mat, float2 scale)
bNodeSocketType NodeSocketTypeUndefined
Span< bNodeType * > node_types_get()
bNodeType NodeTypeUndefined
bNodeSocketType * node_socket_type_find(StringRef idname)
const bNodeInstanceKey NODE_INSTANCE_KEY_NONE
static void std_node_socket_interface_draw(ID *id, bNodeTreeInterfaceSocket *interface_socket, bContext *, ui::Layout *layout)
static const float virtual_node_socket_color[4]
static void node_buts_mix_rgb(ui::Layout &layout, bContext *, PointerRNA *ptr)
static const float std_node_socket_colors[][4]
void node_geometry_add_attribute_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, ui::Layout &layout, const StringRef placeholder)
static bool socket_needs_volume_grid_search(const bNode &node, const bNodeSocket &socket)
static void node_composit_buts_cryptomatte(ui::Layout &layout, bContext *C, PointerRNA *ptr)
static float mute_expand_axis[3][2]
static void calculate_inner_link_bezier_points(std::array< float2, 4 > &points)
static void node_composit_buts_combsep_color(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_socket_undefined_draw(bContext *, ui::Layout *layout, PointerRNA *, PointerRNA *, StringRef)
static void node_composit_buts_cryptomatte_legacy_ex(ui::Layout &layout, bContext *, PointerRNA *)
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 draw_node_socket_name_editable(ui::Layout *layout, bNodeSocket *sock, const StringRef text)
static bool socket_needs_bundle_type_search(const bNode &node, const bNodeSocket &socket)
static void draw_node_socket_without_value(ui::Layout *layout, bNodeSocket *sock, const StringRef text)
void nodesocket_batch_start()
static bool node_link_is_gizmo_link(const SpaceNode &snode, const bNodeLink &link)
void node_geometry_add_volume_grid_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, ui::Layout &layout, const StringRef placeholder)
std::array< float2, 4 > node_link_bezier_points_dragged(const SpaceNode &snode, const bNodeLink &link)
static float arrow_expand_axis[3][2]
static void node_texture_buts_output(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_template_properties_update(bke::bNodeType *ntype)
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)
static void node_shader_buts_scatter(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_buts_time(ui::Layout &layout, bContext *, PointerRNA *ptr)
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 node_shader_buts_tex_image_ex(ui::Layout &layout, bContext *C, PointerRNA *ptr)
float2 node_link_calculate_multi_input_position(const float2 &socket_position, const int index, const int total_inputs)
static void node_texture_buts_image_ex(ui::Layout &layout, bContext *C, PointerRNA *ptr)
static void nodelink_batch_init()
static bool socket_needs_layer_search(const bNode &node, const bNodeSocket &socket)
static struct blender::ed::space_node::@127370036315071203143025210136121224333113371107 g_batch_link
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 nodelink_batch_add_link(const SpaceNode &snode, const std::array< float2, 4 > &points, const NodeLinkDrawConfig &draw_config)
static void node_composit_buts_image(ui::Layout &layout, bContext *C, PointerRNA *ptr)
static void std_node_socket_draw(bContext *C, ui::Layout *layout, PointerRNA *ptr, PointerRNA *node_ptr, StringRef label)
static void node_shader_buts_tex_environment_ex(ui::Layout &layout, bContext *C, PointerRNA *ptr)
static void node_draw_buttons_group(ui::Layout &layout, bContext *C, PointerRNA *ptr)
static void node_composit_buts_image_ex(ui::Layout &layout, bContext *C, PointerRNA *ptr)
static void node_buts_curvecol(ui::Layout &layout, bContext *, PointerRNA *ptr)
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)
static void node_texture_buts_proc(ui::Layout &layout, bContext *, PointerRNA *ptr)
float node_link_dim_factor(const View2D &v2d, const bNodeLink &link)
void node_bundle_type_add_string_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, ui::Layout &layout, const StringRef placeholder)
static void node_texture_buts_bricks(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_composit_set_butfunc(bke::bNodeType *ntype)
static bool node_link_is_field_link(const SpaceNode &snode, const bNodeLink &link)
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_image_views(ui::Layout &layout, bContext *, PointerRNA *ptr, PointerRNA *imaptr)
void nodesocket_batch_end()
static void std_node_socket_color_simple_fn(const bke::bNodeSocketType *type, float *r_color)
static void node_buts_frame_ex(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_buts_output_shader(ui::Layout &layout, bContext *, PointerRNA *ptr)
static bool node_link_draw_is_visible(const View2D &v2d, const std::array< float2, 4 > &points)
static void node_common_set_butfunc(bke::bNodeType *ntype)
static void nodesocket_cache_flush()
static void node_composit_buts_cryptomatte_legacy(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_buts_texture(ui::Layout &layout, bContext *C, PointerRNA *ptr)
void node_link_bezier_points_evaluated(const bNodeLink &link, std::array< float2, NODE_LINK_RESOL+1 > &coords)
static void node_buts_colorramp(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_buts_normal(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_texture_buts_combsep_color(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_texture_set_butfunc(bke::bNodeType *ntype)
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_socket_undefined_draw_color(bContext *, PointerRNA *, PointerRNA *, float *r_color)
static void node_texture_buts_image(ui::Layout &layout, bContext *C, PointerRNA *ptr)
static void node_socket_template_properties_update(bke::bNodeType *ntype, bke::bNodeSocketTemplate *stemp)
static void node_socket_button_label(bContext *, ui::Layout *layout, PointerRNA *, PointerRNA *, const StringRef text)
static void node_shader_set_butfunc(bke::bNodeType *ntype)
NodeResizeDirection node_get_resize_direction(const SpaceNode &snode, const bNode *node, const int x, const int y)
static void node_buts_curvevec(ui::Layout &layout, bContext *, PointerRNA *ptr)
void nodelink_batch_end(const SpaceNode &snode)
static void node_shader_buts_tex_environment(ui::Layout &layout, bContext *C, PointerRNA *ptr)
void nodelink_batch_start(const SpaceNode &)
void std_node_socket_color_fn(bContext *, PointerRNA *, PointerRNA *, float *r_color)
static void node_shader_buts_glossy(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_draw_link_end_marker(const float2 center, const float radius, const ColorTheme4f &color)
static void node_buts_combsep_color(ui::Layout &layout, bContext *, PointerRNA *ptr)
void(*)(bContext *C, PointerRNA *ptr, PointerRNA *node_ptr, float *r_color) SocketColorFn
static void node_shader_buts_tex_image(ui::Layout &layout, bContext *C, PointerRNA *ptr)
static void draw_gizmo_pin_icon(ui::Layout *layout, PointerRNA *socket_ptr)
static void node_socket_undefined_interface_draw(ID *, bNodeTreeInterfaceSocket *, bContext *, ui::Layout *layout)
static void node_buts_math(ui::Layout &layout, bContext *, PointerRNA *ptr)
static void node_socket_virtual_draw_color_simple(const bke::bNodeSocketType *, float *r_color)
void node_geometry_add_layer_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, ui::Layout &layout, const StringRef placeholder)
static float mute_verts[3][2]
static void node_buts_image_user(ui::Layout &layout, bContext *C, PointerRNA *ptr, PointerRNA *imaptr, PointerRNA *iuserptr, const bool show_layer_selection, const bool show_color_management)
static void node_composit_buts_huecorrect(ui::Layout &layout, bContext *, PointerRNA *ptr)
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 gpu::Batch * nodesocket_batch_init()
static void node_property_update_default(Main *bmain, Scene *, PointerRNA *ptr)
static void node_shader_buts_displacement(ui::Layout &layout, bContext *, PointerRNA *ptr)
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)
static void node_buts_curvefloat(ui::Layout &layout, bContext *, PointerRNA *ptr)
void split(const std::string &s, const char delim, std::vector< std::string > &tokens)
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)
int get_value_type(int colorid, int spacetype)
void get_color_4fv(int colorid, float col[4])
const bTheme * theme_get()
void get_color_blend_3f(int colorid1, int colorid2, float fac, float r_col[3])
@ ITEM_R_TEXT_BUT_LABEL_STYLE
void draw_roundbox_corner_set(int type)
float view2d_scale_get_x(const View2D *v2d)
void draw_roundbox_4fv(const rctf *rect, bool filled, float rad, const float col[4])
bool ED_node_is_compositor(const SpaceNode *snode)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void GPU_storagebuf_update(gpu::StorageBuf *ssbo, const void *data)
gpu::FrameBuffer * GPU_framebuffer_active_get()
void uiTemplateImage(ui::Layout *layout, bContext *C, PointerRNA *ptr, StringRefNull propname, PointerRNA *userptr, bool compact, bool multiview)
void wmOrtho2_region_pixelspace(const ARegion *region)
void DRW_draw_view(const bContext *C)
void ED_region_draw_cb_draw(const bContext *C, ARegion *region, int type)
int RNA_enum_get(PointerRNA *ptr, const char *name)
gpu::Batch * GPU_batch_create_ex(GPUPrimType primitive_type, gpu::VertBuf *vertex_buf, gpu::IndexBuf *index_buf, GPUBatchFlag owns_flag)
void GPU_indexbuf_init(GPUIndexBufBuilder *, GPUPrimType, uint prim_len, uint vertex_len)
PropertyRNA * RNA_struct_find_property(PointerRNA *ptr, const char *identifier)
bool BKE_image_is_dirty(Image *image)
void GPU_framebuffer_restore()
MINLINE void copy_v3_v3(float r[3], const float a[3])
void GPU_uniformbuf_free(gpu::UniformBuf *ubo)
void ED_node_sample_set(const float col[4])
@ SOCK_DISPLAY_SHAPE_VOLUME_GRID
@ SOCK_DISPLAY_SHAPE_LIST
void GPU_matrix_identity_set()
MINLINE void copy_v2_v2(float r[2], const float a[2])
@ CMP_NODE_COMBSEP_COLOR_YCC
MINLINE void copy_v4_fl(float r[4], float f)
void ED_init_custom_node_socket_type(bke::bNodeSocketType *stype)
ATTR_WARN_UNUSED_RESULT const BMVert * v
void ED_node_type_draw_color(const char *idname, float *r_color)
void gpu_batch_storage_buffer_register(gpu::StorageBuf *preset_buffer)
bool is_layer_selection_field(const bNodeTreeInterfaceSocket &socket)
VecBase< float, 4 > float4
void ED_node_init_butfuncs()
void GPU_viewport_colorspace_clear(GPUViewport *viewport)
ImBuf * BKE_image_acquire_ibuf_gpu(Image *ima, ImageUser *iuser, void **r_lock, bool *r_load_failed=nullptr, bool cached_only=false)
gpu::IndexBuf * GPU_indexbuf_build(GPUIndexBufBuilder *)
VecBase< float, 2 > float2
BMesh const char void * data
void GPU_vertbuf_attr_set(gpu::VertBuf *, uint a_idx, uint v_idx, const void *data)
@ GPU_SHADER_2D_NODE_SOCKET
@ GPU_SHADER_2D_NODE_SOCKET_INST
void BKE_main_ensure_invariants(Main &bmain, std::optional< Span< ID * > > modified_ids=std::nullopt)
void GPU_batch_draw_instance_range(gpu::Batch *batch, int instance_first, int instance_count)
constexpr size_t ARRAY_SIZE(const T(&arg)[N]) noexcept
void GPU_batch_draw(gpu::Batch *batch)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void gpu_batch_presets_register(gpu::Batch *preset_batch)
PropertyRNA * RNA_struct_type_find_property(StructRNA *srna, const char *identifier)
void interp_v3_v3v3(float r[3], const float a[3], const float b[3], float t)
void GPU_storagebuf_bind(gpu::StorageBuf *ssbo, int slot)
void GPU_framebuffer_bind_no_srgb(gpu::FrameBuffer *fb)
void GPU_indexbuf_add_tri_verts(GPUIndexBufBuilder *, uint v1, uint v2, uint v3)
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
gpu::VertBuf * GPU_vertbuf_create_with_format_ex(const GPUVertFormat &format, GPUUsageType usage)
gpu::UniformBuf * GPU_uniformbuf_create_ex(size_t size, const void *data, const char *name)
uint GPU_vertformat_attr_add(GPUVertFormat *format, StringRef name, gpu::VertAttrType type)
void GPU_batch_program_set_builtin(gpu::Batch *batch, GPUBuiltinShader shader_id)
PointerRNA RNA_pointer_get(PointerRNA *ptr, const char *name)
void ED_init_node_socket_type_virtual(bke::bNodeSocketType *stype)
void BKE_ntree_update_tag_node_property(bNodeTree *ntree, bNode *node)
Main * CTX_data_main(const bContext *C)
void GPU_matrix_pop_projection()
MINLINE float max_ff(float a, float b)
void GPU_vertbuf_data_alloc(gpu::VertBuf &verts, uint v_len)
Image * BKE_image_ensure_viewer(Main *bmain, int type, const char *name)
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
void RNA_def_property_update_runtime(PropertyRNA *prop, RNAPropertyUpdateFunc func)
@ NODE_DEFAULT_INPUT_VALUE
Scene * CTX_data_scene(const bContext *C)
MINLINE void copy_v4_v4(float r[4], const float a[4])
ColorTheme4< float > ColorTheme4f
void GPU_blend(GPUBlend blend)
@ NODE_INTERFACE_SOCKET_INPUT
@ NODE_LINK_INSERT_TARGET
@ NODE_LINK_INSERT_TARGET_INVALID
@ NODE_LINK_TEMP_HIGHLIGHT
bool IMB_colormanagement_space_name_is_data(const char *name)
void ED_init_standard_node_socket_type(bke::bNodeSocketType *stype)
void GPU_uniformbuf_unbind(gpu::UniformBuf *ubo)
@ CMP_NODE_CRYPTOMATTE_SOURCE_RENDER
void BLI_thread_unlock(int type)
void BKE_curve_forward_diff_bezier(float q0, float q1, float q2, float q3, float *p, int it, int stride)
void ED_init_custom_node_type(bke::bNodeType *ntype)
void GPU_matrix_push_projection()
int BKE_image_user_frame_get(const ImageUser *iuser, int cfra, bool *r_is_in_range)
static float _sample_col[4]
void GPU_depth_test(GPUDepthTest test)
GPUViewport * WM_draw_region_get_bound_viewport(ARegion *region)
void BLI_thread_lock(int type)
@ SN_OVERLAY_SHOW_OVERLAYS
@ SN_OVERLAY_SHOW_WIRE_COLORS
void BLI_rctf_init(struct rctf *rect, float xmin, float xmax, float ymin, float ymax)
void BKE_image_release_ibuf(Image *ima, ImBuf *ibuf, void *lock)
#define NODE_RESIZE_MARGIN
KERNEL_FEATURE_LIGHT_PASSES KERNEL_FEATURE_PATH_GUIDING float
eSpaceNodeOverlay_Flag flag
struct bNodeTree * edittree
struct bNodeTree * nodetree
ed::space_node::SpaceNode_Runtime * runtime
eTex_VoronoiDistMetric vn_distm
bke::bNodeSocketType * typeinfo
bke::bNodeSocketRuntime * runtime
eNodeSocketDisplayShape display_shape
NodeTreeInterfaceSocketFlag flag
NodeDefaultInputType default_input
bke::bNodeTreeRuntime * runtime
bNodeInstanceKey active_viewer_key
Vector< RuntimeNodeEnumItem > items
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, ui::Layout *layout)
void(*) draw(bContext *C, ui::Layout *layout, PointerRNA *ptr, PointerRNA *node_ptr, StringRef text)
void(*) draw_buttons(ui::Layout &, bContext *C, PointerRNA *ptr)
bNodeSocketTemplate * inputs
void(*) draw_buttons_ex(ui::Layout &, bContext *C, PointerRNA *ptr)
bNodeSocketTemplate * outputs
Vector< NodeSocketShaderParameters, MAX_SOCKET_INSTANCE > params
ColorTheme4f outline_color
gpu::StorageBuf * link_buf
NodeLinkData data[NODELINK_GROUP_SIZE]
void alignment_set(LayoutAlign alignment)
void label(StringRef name, int icon)
PointerRNA op(wmOperatorType *ot, std::optional< StringRef > name, int icon, wm::OpCallContext context, eUI_Item_Flag flag)
void prop(PointerRNA *ptr, PropertyRNA *prop, int index, int value, eUI_Item_Flag flag, std::optional< StringRef > name_opt, int icon, std::optional< StringRef > placeholder=std::nullopt)
void active_set(bool active)
Layout & split(float percentage, bool align)
Layout & column(bool align)
static constexpr float PROPERTY_SPLIT_FACTOR
void context_ptr_set(StringRef name, const PointerRNA *ptr)
void emboss_set(EmbossType emboss)