65 #include "RNA_prototypes.h"
84 const rctf *rct,
float radius,
float aspect,
float alpha,
int select);
120 if (
id ==
nullptr ||
ntree ==
nullptr) {
169 for (
bNode *parent =
a->parent; parent; parent = parent->parent) {
182 for (
bNode *parent =
b->parent; parent; parent = parent->parent) {
205 if (!b_active && a_active) {
208 if (!b_select && (a_active || a_select)) {
221 while (k < totnodes) {
223 bNode *first_b = first_a;
227 for (
int b = 0;
b < k && first_b;
b++) {
228 first_b = first_b->
next;
231 if (first_b ==
nullptr) {
236 bNode *node_a = first_a;
237 bNode *node_b = first_b;
240 while (
a < k &&
b < k && node_b) {
242 node_a = node_a->
next;
247 node_b = node_b->
next;
258 if (first_b ==
nullptr) {
261 first_b = first_b->
next;
275 const std::string block_name =
"node_" + std::string(nodes[i]->name);
294 r_rect.
xmin = xmin_ymax.x;
295 r_rect.
ymax = xmin_ymax.y;
298 r_rect.
xmax = xmax_ymin.x;
299 r_rect.
ymin = xmax_ymin.y;
320 const bool inputs_first =
node.inputs.first &&
326 loc.x = round(loc.x);
327 loc.y = round(loc.y);
335 if (
node.outputs.first || inputs_first) {
340 bool add_output_space =
false;
373 nsock->typeinfo->draw((
bContext *)&
C, row, &sockptr, &nodeptr,
IFACE_(socket_label));
392 add_output_space =
true;
395 if (add_output_space) {
406 if (
node.preview_xsize &&
node.preview_ysize) {
407 aspect = (
float)
node.preview_ysize / (
float)
node.preview_xsize;
413 if (aspect <= 1.0f) {
422 node.prvr.xmin += 0.5f * dx;
423 node.prvr.xmax -= 0.5f * dx;
429 if (
node.prvr.xmax <
node.prvr.xmin) {
432 if (
node.prvr.ymax <
node.prvr.ymin) {
457 node.typeinfo->draw_buttons(layout, (
bContext *)&
C, &nodeptr);
476 float multi_input_socket_offset = 0.0f;
478 if (nsock->total_inputs > 2) {
482 dy -= multi_input_socket_offset * 0.5f;
505 nsock->typeinfo->draw((
bContext *)&
C, row, &sockptr, &nodeptr,
IFACE_(socket_label));
519 dy = buty - multi_input_socket_offset * 0.5;
530 node.totr.xmin = loc.x;
532 node.totr.ymax = loc.y;
549 int totin = 0, totout = 0;
554 loc.x = round(loc.x);
555 loc.y = round(loc.y);
570 float tot =
MAX2(totin, totout);
572 hiddenrad += 5.0f * (
float)(tot - 4);
575 node.totr.xmin = loc.x;
577 node.totr.ymax = loc.y + (hiddenrad - 0.5f *
NODE_DY);
578 node.totr.ymin =
node.totr.ymax - 2 * hiddenrad;
581 float rad = (
float)
M_PI / (1.0f + (
float)totout);
587 nsock->locx = round(
node.totr.xmax - hiddenrad +
sinf(rad) * hiddenrad);
588 nsock->locy = round(
node.totr.ymin + hiddenrad +
cosf(rad) * hiddenrad);
594 rad = drad = -(
float)
M_PI / (1.0f + (
float)totin);
599 nsock->locx = round(
node.totr.xmin + hiddenrad +
sinf(rad) * hiddenrad);
600 nsock->locy = round(
node.totr.ymin + hiddenrad +
cosf(rad) * hiddenrad);
616 const int nclass = (
node.typeinfo->ui_class ==
nullptr) ?
node.typeinfo->nclass :
675 const float color[4],
676 const float color_outline[4],
720 const float color_outline[4],
734 locx -
width + outline_width * 0.5f,
735 locx +
width - outline_width * 0.5f,
736 locy -
height + outline_width * 0.5f,
737 locy +
height - outline_width * 0.5f,
742 &rect,
color,
nullptr, 1.0f, color_outline, outline_width,
width - outline_width * 0.5f);
748 const int socket_type,
749 float r_outline_color[4])
785 auto id_to_inspection_string = [&](
const ID *
id,
const short idcode) {
793 id_to_inspection_string(*
static_cast<const ID *
const *
>(
buffer),
ID_OB);
796 id_to_inspection_string(*
static_cast<const ID *
const *
>(
buffer),
ID_MA);
799 id_to_inspection_string(*
static_cast<const ID *
const *
>(
buffer),
ID_TE);
802 id_to_inspection_string(*
static_cast<const ID *
const *
>(
buffer),
ID_IM);
805 id_to_inspection_string(*
static_cast<const ID *
const *
>(
buffer),
ID_GR);
807 else if (
type.is<
int>()) {
810 else if (
type.is<
float>()) {
816 else if (
type.is<
bool>()) {
819 else if (
type.is<std::string>()) {
820 ss << *(std::string *)
buffer <<
TIP_(
" (String)");
825 std::stringstream &ss)
841 ss <<
"Value has not been logged";
845 if (
type.is<
int>()) {
846 ss <<
TIP_(
"Integer field");
848 else if (
type.is<
float>()) {
849 ss <<
TIP_(
"Float field");
852 ss <<
TIP_(
"Vector field");
854 else if (
type.is<
bool>()) {
855 ss <<
TIP_(
"Boolean field");
857 else if (
type.is<std::string>()) {
858 ss <<
TIP_(
"String field");
861 ss <<
TIP_(
"Color field");
863 ss <<
TIP_(
" based on:\n");
867 ss <<
"\u2022 " << tooltip;
868 if (i < input_tooltips.
size() - 1) {
876 std::stringstream &ss,
881 ss <<
TIP_(
"Empty Geometry");
888 return std::string(
str);
891 ss <<
TIP_(
"Geometry:\n");
893 const char *line_end = (
type == component_types.
last()) ?
"" :
".\n";
896 const geo_log::GeometryValueLog::MeshInfo &mesh_info = *value_log.
mesh_info;
900 TIP_(
"\u2022 Mesh: %s vertices, %s edges, %s faces"),
904 ss << line << line_end;
908 const geo_log::GeometryValueLog::PointCloudInfo &pointcloud_info =
913 TIP_(
"\u2022 Point Cloud: %s points"),
914 to_string(pointcloud_info.points_num).c_str());
915 ss << line << line_end;
919 const geo_log::GeometryValueLog::CurveInfo &curve_info = *value_log.
curve_info;
923 TIP_(
"\u2022 Curve: %s splines"),
924 to_string(curve_info.splines_num).c_str());
925 ss << line << line_end;
929 const geo_log::GeometryValueLog::InstancesInfo &instances_info = *value_log.
instances_info;
933 TIP_(
"\u2022 Instances: %s"),
934 to_string(instances_info.instances_num).c_str());
935 ss << line << line_end;
939 ss <<
TIP_(
"\u2022 Volume") << line_end;
944 const geo_log::GeometryValueLog::EditDataInfo &edit_info = *value_log.
edit_data_info;
948 TIP_(
"\u2022 Edit Curves: %s, %s"),
949 edit_info.has_deformed_positions ?
TIP_(
"positions") :
TIP_(
"no positions"),
950 edit_info.has_deform_matrices ?
TIP_(
"matrices") :
TIP_(
"no matrices"));
951 ss << line << line_end;
966 ss <<
".\n\n" <<
TIP_(
"Supported: All Types");
970 ss <<
".\n\n" <<
TIP_(
"Supported: ");
978 ss <<
TIP_(
"Point Cloud");
986 ss <<
TIP_(
"Instances");
990 ss <<
TIP_(
"Volume");
997 ss << ((
type == supported_types.
last()) ?
"" :
", ");
1006 if (snode ==
nullptr) {
1011 *snode,
node, socket);
1012 if (socket_log ==
nullptr) {
1016 if (value_log ==
nullptr) {
1020 std::stringstream ss;
1046 if (socket->
runtime->declaration !=
nullptr) {
1059 std::stringstream
output;
1060 if (socket->
runtime->declaration !=
nullptr) {
1069 if (!
output.str().empty()) {
1075 if (socket_inspection_str.has_value()) {
1076 output << *socket_inspection_str;
1079 output <<
TIP_(
"The socket value has not been computed yet");
1083 if (
output.str().empty()) {
1099 data->socket = sock;
1119 const uint shape_id,
1121 const uint outline_col_id,
1123 const bool selected)
1126 float outline_color[4];
1169 data->socket = &sock;
1191 rcti draw_rect = *rect;
1192 float outline_color[4] = {0};
1250 immUniform4f(
"color1", checker_dark, checker_dark, checker_dark, 1.0f);
1251 immUniform4f(
"color2", checker_light, checker_light, checker_light, 1.0f);
1267 rctf draw_rect = *prv;
1268 if (xscale < yscale) {
1313 const char *opname = (
const char *)op_argv;
1336 const bool draw_outputs,
1337 const bool select_all)
1342 if (total_input_len + total_output_len == 0) {
1349 bool selected =
false;
1369 scale *= socket_draw_size;
1376 short selected_input_len = 0;
1381 if (select_all || (sock->flag &
SELECT)) {
1384 selected_input_len++;
1408 short selected_output_len = 0;
1414 if (select_all || (sock->flag &
SELECT)) {
1415 selected_output_len++;
1439 if (selected_input_len + selected_output_len > 0) {
1446 if (selected_input_len) {
1456 if (select_all || (sock->flag &
SELECT)) {
1469 if (--selected_input_len == 0) {
1476 if (selected_output_len) {
1482 if (select_all || (sock->flag &
SELECT)) {
1495 if (--selected_output_len == 0) {
1521 const float width = 0.5f * socket_draw_size;
1525 float outline_color[4];
1538 case geo_log::NodeWarningType::Warning:
1553 case geo_log::NodeWarningType::Warning:
1569 if (priority > highest_priority) {
1570 highest_priority = priority;
1571 highest_priority_type = warning.type;
1574 return highest_priority_type;
1585 std::string complete_string;
1588 complete_string += warning.message;
1591 complete_string +=
'.';
1592 complete_string +=
'\n';
1596 complete_string +=
data.warnings.last().message;
1598 return BLI_strdupn(complete_string.c_str(), complete_string.size());
1601 #define NODE_HEADER_ICON_SIZE (0.8f * U.widget_unit)
1609 if (node_log ==
nullptr) {
1647 std::chrono::microseconds &exec_time,
1653 if (root_tree_log ==
nullptr) {
1657 if (tree_log ==
nullptr) {
1680 std::chrono::microseconds exec_time = std::chrono::microseconds::zero();
1685 if (tree_log ==
nullptr) {
1696 if (tnode->parent != &
node) {
1720 if (node_count == 0) {
1721 return std::string(
"");
1724 uint64_t exec_time_us = exec_time.count();
1727 if (exec_time_us == 0) {
1728 return std::string(
"-");
1730 if (exec_time_us < 100) {
1731 return std::string(
"< 0.1 ms");
1736 if (exec_time_us < 1000) {
1739 else if (exec_time_us < 10000) {
1743 std::stringstream stream;
1744 stream << std::fixed << std::setprecision(precision) << (exec_time_us / 1000.0f);
1745 return stream.str() +
" ms";
1766 std::stringstream ss;
1767 ss <<
TIP_(
"Accessed named attributes:\n");
1769 struct NameWithUsage {
1776 sorted_used_attribute.
append({item.key, item.value});
1779 sorted_used_attribute.
end(),
1780 [](
const NameWithUsage &
a,
const NameWithUsage &
b) {
1781 return BLI_strcasecmp_natural(a.name.c_str(), b.name.c_str()) <= 0;
1784 for (
const NameWithUsage &
attribute : sorted_used_attribute) {
1787 ss <<
" \u2022 \"" << name <<
"\": ";
1789 if ((usage & eNamedAttrUsage::Read) != eNamedAttrUsage::None) {
1792 if ((usage & eNamedAttrUsage::Write) != eNamedAttrUsage::None) {
1795 if ((usage & eNamedAttrUsage::Remove) != eNamedAttrUsage::None) {
1800 if (i < usages.size() - 1) {
1808 "Attributes with these names used within the group may conflict with existing attributes");
1815 const int attributes_num = usage_by_attribute_name.
size();
1819 TIP_(attributes_num == 1 ?
" Named Attribute" :
" Named Attributes");
1820 row.
icon = ICON_SPREADSHEET;
1833 if (root_tree_log ==
nullptr) {
1834 return std::nullopt;
1837 if (tree_log ==
nullptr) {
1838 return std::nullopt;
1844 usage_by_attribute.lookup_or_add_as(used_attribute.name,
1845 used_attribute.usage) |= used_attribute.usage;
1848 if (usage_by_attribute.
is_empty()) {
1849 return std::nullopt;
1860 if (
STREQ(socket->name,
"Name")) {
1862 return std::nullopt;
1868 if (node_log ==
nullptr) {
1869 return std::nullopt;
1874 used_attribute.usage) |= used_attribute.usage;
1876 if (usage_by_attribute.
is_empty()) {
1877 return std::nullopt;
1882 return std::nullopt;
1895 rows.
append(std::move(*row));
1904 if (!row.
text.empty()) {
1906 "The execution time from the node tree's latest evaluation. For frame and group nodes, "
1907 "the time for all sub-nodes");
1908 row.
icon = ICON_PREVIEW_RANGE;
1909 rows.
append(std::move(row));
1914 if (node_log !=
nullptr) {
1918 row.
icon = ICON_INFO;
1919 rows.
append(std::move(row));
1932 const float but_icon_left = rect.
xmin + 6.0f *
U.dpi_fac;
1934 const float but_icon_right = but_icon_left + but_icon_width;
1940 extra_info_row.
icon,
1942 (
int)(rect.
ymin + row * (20.0f *
U.dpi_fac)),
1959 const float but_text_left = but_icon_right + 6.0f *
U.dpi_fac;
1960 const float but_text_right = rect.
xmax;
1961 const float but_text_width = but_text_right - but_text_left;
1966 extra_info_row.
text.c_str(),
1968 (
int)(rect.
ymin + row * (20.0f *
U.dpi_fac)),
1969 (
short)but_text_width,
1988 if (extra_info_rows.
size() == 0) {
1994 rctf extra_info_rect;
1996 const float width = (
node.width - 6.0f) *
U.dpi_fac;
2000 extra_info_rect.
xmax = rct.
xmin + 95.0f *
U.dpi_fac;
2001 extra_info_rect.
ymin = rct.
ymin + 2.0f *
U.dpi_fac;
2002 extra_info_rect.
ymax = rct.
ymin + 2.0f *
U.dpi_fac;
2005 extra_info_rect.
xmin = rct.
xmin + 3.0f *
U.dpi_fac;
2008 extra_info_rect.
ymax = rct.
ymax + extra_info_rows.
size() * (20.0f *
U.dpi_fac);
2023 const float outline_width = 1.0f;
2024 extra_info_rect.
xmin = rct.
xmin + 3.0f *
U.dpi_fac - outline_width;
2026 extra_info_rect.
ymin = rct.
ymax - outline_width;
2027 extra_info_rect.
ymax = rct.
ymax + outline_width + extra_info_rows.
size() * (20.0f *
U.dpi_fac);
2077 float color_header[4];
2092 float iconofs = rct.
xmax - 0.35f *
U.widget_unit;
2096 iconofs -= iconbutw;
2122 iconofs -= iconbutw;
2142 iconofs -= iconbutw;
2147 node.typeinfo->ui_icon,
2173 const int but_size =
U.widget_unit * 0.8f;
2204 (
short)(iconofs - rct.
xmin - (18.0f *
U.dpi_fac)),
2222 const float outline_width = 1.0f;
2262 float color_underline[4];
2285 rct.
xmin - outline_width,
2286 rct.
xmax + outline_width,
2287 rct.
ymin - outline_width,
2288 rct.
ymax + outline_width,
2292 float color_outline[4];
2399 const int but_size =
U.widget_unit * 1.0f;
2407 centy - but_size / 2,
2441 const float outline_width = 1.0f;
2443 rct.
xmin - outline_width,
2444 rct.
xmax + outline_width,
2445 rct.
ymin - outline_width,
2446 rct.
ymax + outline_width,
2450 float color_outline[4];
2476 float dx = 0.5f *
U.widget_unit;
2478 const float dy = 0.2f *
U.widget_unit;
2510 if (directions == 0) {
2525 if (
ntree ==
nullptr) {
2594 const float margin = 1.5f *
U.widget_unit;
2606 for (
const bNode *tnode : nodes) {
2607 if (tnode->parent != &
node) {
2612 rctf noderect = tnode->totr;
2613 noderect.
xmin -= margin;
2614 noderect.
xmax += margin;
2615 noderect.
ymin -= margin;
2616 noderect.
ymax += margin;
2647 nsock->
locx = loc.x;
2648 nsock->
locy = loc.y;
2651 nsock->
locx = loc.x;
2652 nsock->
locy = loc.y;
2654 const float size = 8.0f;
2710 const float font_size =
data->label_size / aspect;
2729 const int label_height = ((margin / aspect) + (ascender * aspect));
2735 float y = rct.
ymax - label_height;
2738 const bool has_label =
node.label[0] !=
'\0';
2748 const float line_spacing = (line_height_max * aspect);
2752 x = rct.
xmin + margin;
2753 y = rct.
ymax - label_height - (has_label ? line_spacing : 0);
2756 int y_min =
y + ((margin * 2) - (
y - rct.
ymin));
2762 y - (
floorf(((
y - rct.
ymin) - (margin * 2)) / line_spacing) * line_spacing),
2763 rct.
xmin + line_width,
2770 if (line->line[0]) {
2772 BLF_draw_ex(fontid, line->line, line->len, &info);
2773 y -= line_spacing * info.
lines;
2804 const float alpha =
color[3];
2855 if (
node.label[0] !=
'\0') {
2858 const short width = 512;
2860 const int y =
node.totr.ymax;
2914 #define USE_DRAW_TOT_UPDATE
2924 #ifdef USE_DRAW_TOT_UPDATE
2930 #ifdef USE_DRAW_TOT_UPDATE
2987 const int x = rect->
xmin + padding_x;
3038 const int max_tree_length = 3;
3039 const float bright_factor = 0.25f;
3046 const int depth =
max_ii(0, clamped_tree_path_length - 1);
3123 float original_proj[4][4];
typedef float(TangentPoint)[2]
void immDrawPixelsTexTiled(IMMDrawPixelsTexState *state, float x, float y, int img_w, int img_h, eGPUTextureFormat gpu_format, bool use_filter, void *rect, float xzoom, float yzoom, const float color[4])
IMMDrawPixelsTexState immDrawPixelsTexSetup(int builtin)
PointerRNA CTX_data_pointer_get(const bContext *C, const char *member)
struct SpaceNode * CTX_wm_space_node(const bContext *C)
struct ARegion * CTX_wm_region(const bContext *C)
struct wmWindow * CTX_wm_window(const bContext *C)
@ GEO_COMPONENT_TYPE_MESH
@ GEO_COMPONENT_TYPE_POINT_CLOUD
@ GEO_COMPONENT_TYPE_INSTANCES
@ GEO_COMPONENT_TYPE_EDIT
@ GEO_COMPONENT_TYPE_CURVE
@ GEO_COMPONENT_TYPE_VOLUME
const char * BKE_idtype_idcode_to_name(short idcode)
void id_us_ensure_real(struct ID *id)
void nodeFromView(const struct bNode *node, float x, float y, float *rx, float *ry)
#define NODE_CLASS_OUTPUT
struct bNodeTree * ntreeFromID(struct ID *id)
#define GEO_NODE_STORE_NAMED_ATTRIBUTE
bool nodeLinkIsHidden(const struct bNodeLink *link)
#define NODE_CLASS_INTERFACE
#define NODE_CLASS_CONVERTER
#define GEO_NODE_REMOVE_ATTRIBUTE
bool nodeTypeUndefined(const struct bNode *node)
#define NODE_CLASS_PATTERN
int nodeSocketIsHidden(const struct bNodeSocket *sock)
#define GEO_NODE_INPUT_NAMED_ATTRIBUTE
#define NODE_CLASS_GEOMETRY
#define NODE_CLASS_DISTORT
#define NODE_CLASS_OP_VECTOR
void nodeLabel(const struct bNodeTree *ntree, const struct bNode *node, char *label, int maxlen)
#define NODE_CLASS_LAYOUT
bool nodeLinkIsSelected(const struct bNodeLink *link)
#define NODE_CLASS_OP_COLOR
#define NODE_CLASS_OP_FILTER
const bNodeInstanceKey NODE_INSTANCE_KEY_NONE
#define NODE_CLASS_ATTRIBUTE
#define NODE_CLASS_TEXTURE
void nodeToView(const struct bNode *node, float x, float y, float *rx, float *ry)
#define NODE_CLASS_SHADER
void * BKE_node_instance_hash_lookup(bNodeInstanceHash *hash, bNodeInstanceKey key)
const char * nodeSocketLabel(const struct bNodeSocket *sock)
bNodeInstanceKey BKE_node_instance_key(bNodeInstanceKey parent_key, const struct bNodeTree *ntree, const struct bNode *node)
#define NODE_CLASS_SCRIPT
General operations, lookup, etc. for blender objects.
void BLF_aspect(int fontid, float x, float y, float z)
void BLF_color3ubv(int fontid, const unsigned char rgb[3])
void BLF_clipping(int fontid, int xmin, int ymin, int xmax, int ymax)
void BLF_disable(int fontid, int option)
void BLF_draw_ex(int fontid, const char *str, size_t str_len, struct ResultBLF *r_info) ATTR_NONNULL(2)
float BLF_width(int fontid, const char *str, size_t str_len) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void BLF_draw(int fontid, const char *str, size_t str_len) ATTR_NONNULL(2)
void BLF_enable(int fontid, int option)
int BLF_height_max(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_size(int fontid, float size, int dpi)
int BLF_ascender(int fontid) ATTR_WARN_UNUSED_RESULT
void BLF_wordwrap(int fontid, int wrap_width)
void BLF_position(int fontid, float x, float y, float z)
#define BLI_assert_unreachable()
#define BUFFER_FOR_CPP_TYPE_VALUE(type, variable_name)
#define LISTBASE_FOREACH(type, var, list)
int BLI_listbase_count_at_most(const struct ListBase *listbase, int count_max) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BLI_remlink(struct ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_insertlinkbefore(struct ListBase *listbase, void *vnextlink, void *vnewlink) ATTR_NONNULL(1)
int BLI_listbase_count(const struct ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE int round_fl_to_int(float a)
MINLINE float max_ff(float a, float b)
MINLINE int min_ii(int a, int b)
MINLINE float min_ff(float a, float b)
MINLINE int max_ii(int a, int b)
MINLINE void rgba_float_args_set(float col[4], float r, float g, float b, float a)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v2_v2(float r[2], const float a[2])
MINLINE void mul_v3_fl(float r[3], float f)
bool BLI_rctf_is_empty(const struct rctf *rect)
BLI_INLINE int BLI_rcti_size_y(const struct rcti *rct)
void BLI_rctf_union(struct rctf *rct_a, const struct rctf *rct_b)
BLI_INLINE float BLI_rctf_cent_y(const struct rctf *rct)
bool BLI_rctf_isect(const struct rctf *src1, const struct rctf *src2, struct rctf *dest)
BLI_INLINE float BLI_rctf_cent_x(const struct rctf *rct)
void BLI_rcti_resize(struct rcti *rect, int x, int y)
BLI_INLINE int BLI_rcti_size_x(const struct rcti *rct)
bool BLI_rctf_isect_pt(const struct rctf *rect, float x, float y)
BLI_INLINE int BLI_rcti_cent_y(const struct rcti *rct)
BLI_INLINE float BLI_rctf_size_x(const struct rctf *rct)
BLI_INLINE float BLI_rctf_size_y(const struct rctf *rct)
BLI_INLINE int BLI_rcti_cent_x(const struct rcti *rct)
void BLI_rctf_init_minmax(struct rctf *rect)
char * BLI_strdup(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL() ATTR_MALLOC
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
size_t BLI_str_format_int_grouped(char dst[16], int num) ATTR_NONNULL()
char * BLI_strncpy(char *__restrict dst, const char *__restrict src, size_t maxncpy) ATTR_NONNULL()
size_t BLI_snprintf(char *__restrict dst, size_t maxncpy, const char *__restrict format,...) ATTR_NONNULL(1
void DEG_id_tag_update(struct ID *id, int flag)
#define NODE_FRAME_RESIZEABLE
#define NODE_CUSTOM_COLOR
#define NODE_FRAME_SHRINK
@ SOCK_DISPLAY_SHAPE_CIRCLE_DOT
@ SOCK_DISPLAY_SHAPE_CIRCLE
@ SOCK_DISPLAY_SHAPE_SQUARE_DOT
@ SOCK_DISPLAY_SHAPE_SQUARE
@ SOCK_DISPLAY_SHAPE_DIAMOND
@ SOCK_DISPLAY_SHAPE_DIAMOND_DOT
@ SN_OVERLAY_SHOW_TIMINGS
@ SN_OVERLAY_SHOW_OVERLAYS
@ SN_OVERLAY_SHOW_NAMED_ATTRIBUTES
#define NODE_GRID_STEP_SIZE
const rcti * ED_region_visible_rect(ARegion *region)
#define REGION_DRAW_POST_VIEW
void ED_region_draw_cb_draw(const struct bContext *C, struct ARegion *region, int type)
#define REGION_DRAW_PRE_VIEW
NSNotificationCenter * center
struct GPUFrameBuffer GPUFrameBuffer
void GPU_framebuffer_bind_no_srgb(GPUFrameBuffer *fb)
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei height
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint y
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum type
_GL_VOID GLfloat value _GL_VOID_RET _GL_VOID const GLuint GLboolean *residences _GL_BOOL_RET _GL_VOID GLsizei GLfloat GLfloat GLfloat GLfloat const GLubyte *bitmap _GL_VOID_RET _GL_VOID GLenum const void *lists _GL_VOID_RET _GL_VOID const GLdouble *equation _GL_VOID_RET _GL_VOID GLdouble GLdouble blue _GL_VOID_RET _GL_VOID GLfloat GLfloat blue _GL_VOID_RET _GL_VOID GLint GLint blue _GL_VOID_RET _GL_VOID GLshort GLshort blue _GL_VOID_RET _GL_VOID GLubyte GLubyte blue _GL_VOID_RET _GL_VOID GLuint GLuint blue _GL_VOID_RET _GL_VOID GLushort GLushort blue _GL_VOID_RET _GL_VOID GLbyte GLbyte GLbyte alpha _GL_VOID_RET _GL_VOID GLdouble GLdouble GLdouble alpha _GL_VOID_RET _GL_VOID GLfloat GLfloat GLfloat alpha _GL_VOID_RET _GL_VOID GLint GLint GLint alpha _GL_VOID_RET _GL_VOID GLshort GLshort GLshort alpha _GL_VOID_RET _GL_VOID GLubyte GLubyte GLubyte alpha _GL_VOID_RET _GL_VOID GLuint GLuint GLuint alpha _GL_VOID_RET _GL_VOID GLushort GLushort GLushort alpha _GL_VOID_RET _GL_VOID GLenum mode _GL_VOID_RET _GL_VOID GLint GLsizei width
void GPU_matrix_pop(void)
void GPU_matrix_pop_projection(void)
void GPU_matrix_push(void)
#define GPU_matrix_projection_get(x)
#define GPU_matrix_projection_set(x)
void GPU_matrix_identity_set(void)
void GPU_matrix_push_projection(void)
@ GPU_SHADER_KEYFRAME_SHAPE
@ GPU_SHADER_2D_UNIFORM_COLOR
@ GPU_SHADER_2D_IMAGE_COLOR
@ GPU_KEYFRAME_SHAPE_INNER_DOT
@ GPU_KEYFRAME_SHAPE_CIRCLE
@ GPU_KEYFRAME_SHAPE_DIAMOND
#define GPU_KEYFRAME_SHAPE_SQUARE
void GPU_program_point_size(bool enable)
void GPU_blend(eGPUBlend blend)
void GPU_scissor_test(bool enable)
void GPU_line_width(float width)
void GPU_line_smooth(bool enable)
eGPUBlend GPU_blend_get(void)
void GPU_depth_test(eGPUDepthTest test)
GPUFrameBuffer * GPU_viewport_framebuffer_overlay_get(GPUViewport *viewport)
Read Guarded memory(de)allocation.
in reality light always falls off quadratically Particle Retrieve the data of the particle that spawned the object for example to give variation to multiple instances of an object Point Retrieve information about points in a point cloud Retrieve the edges of an object as it appears to Cycles topology will always appear triangulated Convert a blackbody temperature to an RGB value Normal Generate a perturbed normal from an RGB normal map image Typically used for faking highly detailed surfaces Generate an OSL shader from a file or text data block Image Sample an image file as a texture Sky Generate a procedural sky texture Noise Generate fractal Perlin noise Wave Generate procedural bands or rings with noise Voronoi Generate Worley noise based on the distance to random points Typically used to generate textures such as or biological cells Brick Generate a procedural texture producing bricks Texture Retrieve multiple types of texture coordinates nTypically used as inputs for texture nodes Vector Convert a or normal between and object coordinate space Combine Create a color from its and value channels Color Retrieve a color attribute
Group Output data from inside of a node group A color picker Mix two input colors RGB to Convert a color s luminance to a grayscale value Generate a normal vector and a dot product Bright Control the brightness and contrast of the input color Vector Map an input vectors to used to fine tune the interpolation of the input Camera Retrieve information about the camera and how it relates to the current shading point s position Clamp a value between a minimum and a maximum Vector Perform vector math operation Invert a color
#define UI_ALPHA_CHECKER_LIGHT
void uiLayoutSetActive(uiLayout *layout, bool active)
eUIEmbossType UI_block_emboss_get(uiBlock *block)
const struct uiStyle * UI_style_get_dpi(void)
uiBut * uiDefIconBut(uiBlock *block, int type, int retval, int icon, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
void UI_draw_roundbox_4fv(const struct rctf *rect, bool filled, float rad, const float col[4])
uiBut * uiDefBut(uiBlock *block, int type, int retval, const char *str, int x, int y, short width, short height, void *poin, float min, float max, float a1, float a2, const char *tip)
void UI_but_func_tooltip_set(uiBut *but, uiButToolTipFunc func, void *arg, uiFreeArgFunc free_arg)
const struct uiStyle * UI_style_get(void)
#define UI_ALPHA_CHECKER_DARK
char *(* uiButToolTipFunc)(struct bContext *C, void *argN, const char *tip)
void uiLayoutSetAlignment(uiLayout *layout, char alignment)
void UI_draw_roundbox_corner_set(int type)
uiLayout * uiLayoutRow(uiLayout *layout, bool align)
void UI_block_end(const struct bContext *C, uiBlock *block)
void uiLayoutSetTooltipFunc(uiLayout *layout, uiButToolTipFunc func, void *arg, uiCopyArgFunc copy_arg, uiFreeArgFunc free_arg)
void UI_block_emboss_set(uiBlock *block, eUIEmbossType emboss)
void UI_block_draw(const struct bContext *C, struct uiBlock *block)
void UI_but_drawflag_disable(uiBut *but, int flag)
uiLayout * UI_block_layout(uiBlock *block, int dir, int type, int x, int y, int size, int em, int padding, const struct uiStyle *style)
void UI_but_func_set(uiBut *but, uiButHandleFunc func, void *arg1, void *arg2)
void UI_draw_roundbox_aa(const struct rctf *rect, bool filled, float rad, const float color[4])
void uiLayoutSetContextPointer(uiLayout *layout, const char *name, struct PointerRNA *ptr)
uiBlock * UI_block_begin(const struct bContext *C, struct ARegion *region, const char *name, eUIEmbossType emboss)
void UI_draw_roundbox_4fv_ex(const struct rctf *rect, const float inner1[4], const float inner2[4], float shade_dir, const float outline[4], float outline_width, float rad)
void UI_block_layout_resolve(uiBlock *block, int *r_x, int *r_y)
void UI_block_flag_enable(uiBlock *block, int flag)
void UI_but_flag_enable(uiBut *but, int flag)
void UI_block_bounds_set_explicit(uiBlock *block, int minx, int miny, int maxx, int maxy)
void UI_block_align_end(uiBlock *block)
void UI_GetThemeColor3fv(int colorid, float col[3])
int UI_GetThemeValueType(int colorid, int spacetype)
void UI_GetThemeColorBlend4f(int colorid1, int colorid2, float fac, float r_col[4])
void UI_GetThemeColorBlendShade4fv(int colorid1, int colorid2, float fac, int offset, float col[4])
void UI_GetThemeColorShadeAlpha4fv(int colorid, int coloffset, int alphaoffset, float col[4])
void UI_GetThemeColor4fv(int colorid, float col[4])
void UI_GetThemeColorBlendShade3ubv(int colorid1, int colorid2, float fac, int offset, unsigned char col[3])
void UI_view2d_center_set(struct View2D *v2d, float x, float y)
void UI_view2d_scale_get(const struct View2D *v2d, float *r_x, float *r_y)
void UI_view2d_view_restore(const struct bContext *C)
void UI_view2d_view_ortho(const struct View2D *v2d)
void UI_view2d_region_to_view(const struct View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
void UI_view2d_dot_grid_draw(const struct View2D *v2d, int grid_color_id, float min_step, int grid_subdivisions)
void UI_view2d_scrollers_draw(struct View2D *v2d, const struct rcti *mask_custom)
void UI_view2d_center_get(const struct View2D *v2d, float *r_x, float *r_y)
@ WM_GIZMOMAP_DRAWSTEP_2D
void ED_annotation_draw_view2d(const bContext *C, bool onlyv2d)
__forceinline const avxb select(const avxb &m, const avxb &t, const avxb &f)
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
void sort(btMatrix3x3 &U, btVector3 &sigma, btMatrix3x3 &V, int t)
Helper function of 3X3 SVD for sorting singular values.
const CPPType * type() const
Value lookup_default(const Key &key, const Value &default_value) const
Value & lookup_or_add_as(ForwardKey &&key, ForwardValue &&...value)
Value & lookup_or_add(const Key &key, const Value &value)
ItemIterator items() const
constexpr const T & last(const int64_t n=0) const
constexpr int64_t size() const
constexpr IndexRange index_range() const
constexpr bool is_empty() const
constexpr bool is_empty() const
constexpr const char * data() const
void append(const T &value)
IndexRange index_range() const
StringRefNull description() const
eNodeSocketInOut in_out() const
Span< GeometryComponentType > supported_types() const
const CPPType & type() const
const fn::GField & field() const
Span< std::string > input_tooltips() const
std::optional< CurveInfo > curve_info
std::optional< MeshInfo > mesh_info
Span< GeometryComponentType > component_types() const
std::optional< PointCloudInfo > pointcloud_info
std::optional< EditDataInfo > edit_data_info
std::optional< InstancesInfo > instances_info
static const NodeLog * find_node_by_node_editor_context(const SpaceNode &snode, const bNode &node)
static const TreeLog * find_tree_by_node_editor_context(const SpaceNode &snode)
static const SocketLog * find_socket_by_node_editor_context(const SpaceNode &snode, const bNode &node, const bNodeSocket &socket)
void execution_time(std::chrono::microseconds exec_time)
Span< UsedNamedAttribute > used_named_attributes() const
Span< NodeWarning > warnings() const
Span< std::string > debug_messages() const
const ValueLog * value() const
const TreeLog * lookup_child_log(StringRef node_name) const
void foreach_node_log(FunctionRef< void(const NodeLog &)> fn) const
SyclQueue void void size_t num_bytes void
static const char * to_string(const Interpolation &interp)
void GPU_clear_color(float red, float green, float blue, float alpha)
ccl_global float * buffer
ccl_global KernelShaderEvalInput ccl_global float * output
ccl_gpu_kernel_postfix ccl_global float int int int int float bool int offset
void(* MEM_freeN)(void *vmemh)
void *(* MEM_dupallocN)(const void *vmemh)
void *(* MEM_mallocN)(size_t len, const char *str)
static Array< uiBlock * > node_uiblocks_init(const bContext &C, Span< bNode * > nodes)
float node_socket_calculate_height(const bNodeSocket &socket)
void node_sort(bNodeTree &ntree)
void node_socket_add_tooltip(bNodeTree *ntree, bNode *node, bNodeSocket *sock, uiLayout *layout)
int node_get_resize_cursor(NodeResizeDirection directions)
static void node_socket_outline_color_get(const bool selected, const int socket_type, float r_outline_color[4])
void node_set_cursor(wmWindow &win, SpaceNode &snode, const float2 &cursor)
static void node_draw(const bContext &C, ARegion ®ion, const SpaceNode &snode, bNodeTree &ntree, bNode &node, uiBlock &block, bNodeInstanceKey key)
static void node_draw_preview(bNodePreview *preview, rctf *prv)
static void node_draw_hidden(const bContext &C, const View2D &v2d, const SpaceNode &snode, bNodeTree &ntree, bNode &node, uiBlock &block)
static char * named_attribute_tooltip(bContext *UNUSED(C), void *argN, const char *UNUSED(tip))
static char * node_socket_get_tooltip(bContext *C, bNodeTree *ntree, bNode *node, bNodeSocket *socket)
static void draw_nodetree(const bContext &C, ARegion ®ion, bNodeTree &ntree, bNodeInstanceKey parent_key)
static void node_update_nodetree(const bContext &C, bNodeTree &ntree, Span< bNode * > nodes, Span< uiBlock * > blocks)
static NodeExtraInfoRow row_from_used_named_attribute(const Map< std::string, eNamedAttrUsage > &usage_by_attribute_name)
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_background_color(const SpaceNode &snode)
void nodelink_batch_end(SpaceNode &snode)
static std::chrono::microseconds node_get_execution_time(const bNodeTree &ntree, const bNode &node, const SpaceNode &snode, int &node_count)
static void node_update_basis(const bContext &C, bNodeTree &ntree, bNode &node, uiBlock &block)
void node_socket_color_get(const bContext &C, const bNodeTree &ntree, PointerRNA &node_ptr, const bNodeSocket &sock, float r_color[4])
void node_draw_link(const bContext &C, const View2D &v2d, const SpaceNode &snode, const bNodeLink &link, const bool selected)
static void node_draw_mute_line(const bContext &C, const View2D &v2d, const SpaceNode &snode, const bNode &node)
static void create_inspection_string_for_generic_value(const GPointer value, std::stringstream &ss)
static void reroute_node_prepare_for_draw(bNode &node)
static void node_draw_sockets(const View2D &v2d, const bContext &C, bNodeTree &ntree, bNode &node, uiBlock &block, const bool draw_outputs, const bool select_all)
void draw_nodespace_back_pix(const bContext &C, ARegion ®ion, SpaceNode &snode, bNodeInstanceKey parent_key)
static void frame_node_draw(const bContext &C, const ARegion ®ion, const SpaceNode &snode, bNodeTree &ntree, bNode &node, uiBlock &block)
static void count_multi_input_socket_links(bNodeTree &ntree, SpaceNode &snode)
NodeResizeDirection node_get_resize_direction(const bNode *node, const int x, const int y)
void nodelink_batch_start(SpaceNode &UNUSED(snode))
static Vector< NodeExtraInfoRow > node_get_extra_info(const SpaceNode &snode, const bNode &node)
static void node_draw_extra_info_row(const bNode &node, uiBlock &block, const rctf &rect, const int row, const NodeExtraInfoRow &extra_info_row)
bool node_find_indicated_socket(SpaceNode &snode, bNode **nodep, bNodeSocket **sockp, const float2 &cursor, const eNodeSocketInOut in_out)
static void node_draw_basis(const bContext &C, const View2D &v2d, const SpaceNode &snode, bNodeTree &ntree, bNode &node, uiBlock &block, bNodeInstanceKey key)
Vector< ui::ContextPathItem > context_path_for_space_node(const bContext &C)
static void node_socket_draw_multi_input(const float color[4], const float color_outline[4], const float width, const float height, const int locx, const int locy)
static void node_update_hidden(bNode &node, uiBlock &block)
void node_select_single(bContext &C, bNode &node)
static int node_error_type_to_icon(const geo_log::NodeWarningType type)
static bool node_socket_has_tooltip(bNodeTree *ntree, bNodeSocket *socket)
static std::optional< NodeExtraInfoRow > node_get_accessed_attributes_row(const SpaceNode &snode, const bNode &node)
static void node_socket_draw(const bNodeSocket &sock, const float color[4], const float color_outline[4], float size, int locx, int locy, uint pos_id, uint col_id, uint shape_id, uint size_id, uint outline_col_id)
static void get_exec_time_other_nodes(const bNode &node, const SpaceNode &snode, std::chrono::microseconds &exec_time, int &node_count)
static void node_draw_nodetree(const bContext &C, ARegion ®ion, SpaceNode &snode, bNodeTree &ntree, Span< bNode * > nodes, Span< uiBlock * > blocks, bNodeInstanceKey parent_key)
static void reroute_node_draw(const bContext &C, ARegion ®ion, bNodeTree &ntree, bNode &node, uiBlock &block)
static const float virtual_node_socket_outline_color[4]
float2 node_to_view(const bNode &node, const float2 &co)
void snode_set_context(const bContext &C)
static int node_get_colorid(const bNode &node)
static void node_toggle_button_cb(struct bContext *C, void *node_argv, void *op_argv)
static std::string node_get_execution_time_label(const SpaceNode &snode, const bNode &node)
rctf node_frame_rect_inside(const bNode &node)
static void frame_node_draw_label(const bNodeTree &ntree, const bNode &node, const SpaceNode &snode)
static uint8_t node_error_type_priority(const geo_log::NodeWarningType type)
void node_to_updated_rect(const bNode &node, rctf &r_rect)
void node_draw_space(const bContext &C, ARegion ®ion)
static void node_draw_preview_background(rctf *rect)
static void node_draw_shadow(const SpaceNode &snode, const bNode &node, const float radius, const float alpha)
static void node_draw_extra_info_panel(const SpaceNode &snode, const bNode &node, uiBlock &block)
static geo_log::NodeWarningType node_error_highest_priority(Span< geo_log::NodeWarning > warnings)
static void draw_tree_path(const bContext &C, ARegion ®ion)
static void node_add_error_message_button(const bContext &C, bNode &node, uiBlock &block, const rctf &rect, float &icon_offset)
static void create_inspection_string_for_geometry(const geo_log::GeometryValueLog &value_log, std::stringstream &ss, const nodes::decl::Geometry *geometry)
static void create_inspection_string_for_gfield(const geo_log::GFieldValueLog &value_log, std::stringstream &ss)
static std::optional< std::string > create_socket_inspection_string(bContext *C, bNode &node, bNodeSocket &socket)
static bool compare_nodes(const bNode *a, const bNode *b)
static void node_socket_draw_nested(const bContext &C, bNodeTree &ntree, PointerRNA &node_ptr, uiBlock &block, bNodeSocket &sock, const uint pos_id, const uint col_id, const uint shape_id, const uint size_id, const uint outline_col_id, const float size, const bool selected)
float2 node_from_view(const bNode &node, const float2 &co)
static char * node_errors_tooltip_fn(bContext *UNUSED(C), void *argN, const char *UNUSED(tip))
static void frame_node_prepare_for_draw(bNode &node, Span< bNode * > nodes)
static void snode_setup_v2d(SpaceNode &snode, ARegion ®ion, const float2 ¢er)
void evaluate_constant_field(const GField &field, void *r_value)
void template_breadcrumbs(uiLayout &layout, Span< ContextPathItem > context_path)
vec_base< float, 2 > float2
std::string to_string(const T &n)
static const pxr::TfToken b("b", pxr::TfToken::Immortal)
static const pxr::TfToken preview("preview", pxr::TfToken::Immortal)
#define NODE_HEADER_ICON_SIZE
void ED_node_socket_draw(bNodeSocket *sock, const rcti *rect, const float color[4], float scale)
void ui_draw_dropshadow(const rctf *rct, float radius, float aspect, float alpha, int select)
float ED_node_grid_size()
void ED_node_tag_update_id(ID *id)
static bNodeTree * node_tree_from_ID(ID *id)
void ED_node_tree_update(const bContext *C)
#define NODE_SOCK_OUTLINE_SCALE
#define NODE_MULTI_INPUT_LINK_GAP
#define NODE_SOCKSIZE_DRAW_MULIPLIER
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
void RNA_pointer_create(ID *id, StructRNA *type, void *data, PointerRNA *r_ptr)
unsigned __int64 uint64_t
struct wmGizmoMap * gizmo_map
SpaceNode_Runtime * runtime
struct bNodeTree * edittree
struct bNodeTree * nodetree
void(* draw_color)(struct bContext *C, struct PointerRNA *ptr, struct PointerRNA *node_ptr, float *r_color)
bNodeSocketRuntimeHandle * runtime
struct bNodeSocketType * typeinfo
struct bNodeTree * nodetree
bNodeInstanceKey parent_key
std::unique_ptr< bNodeLinkDrag > linkdrag
struct wmEvent * eventstate
void WM_cursor_set(wmWindow *win, int curs)
GPUViewport * WM_draw_region_get_viewport(ARegion *region)
void WM_main_add_notifier(unsigned int type, void *reference)
int WM_operator_name_call(bContext *C, const char *opstring, wmOperatorCallContext context, PointerRNA *properties, const wmEvent *event)
void WM_gizmomap_draw(wmGizmoMap *gzmap, const bContext *C, const eWM_GizmoFlagMapDrawStep drawstep)
void wmOrtho2_pixelspace(const float x, const float y)
void wmOrtho2_region_pixelspace(const ARegion *region)