19#define DNA_DEPRECATED_ALLOW
78#include "RNA_prototypes.hh"
137 ntree->
runtime = MEM_new<bNodeTreeRuntime>(__func__);
143 std::optional<Library *> ,
154 ntree_dst->
runtime = MEM_new<bNodeTreeRuntime>(__func__);
165 ntree_dst, *src_node, flag_subdata,
false, socket_map);
167 new_node->
runtime->index_in_tree =
i;
184 for (
bNode *node : ntree_dst->all_nodes()) {
190 for (
bNode *node : ntree_dst->all_nodes()) {
197 for (
const auto &item : ntree_src->
runtime->previews.items()) {
198 dst_runtime.
previews.add_new(item.key, item.value);
202 if (ntree_src->
runtime->field_inferencing_interface) {
204 *ntree_src->
runtime->field_inferencing_interface);
206 if (ntree_src->
runtime->structure_type_interface) {
208 *ntree_src->
runtime->structure_type_interface);
210 if (ntree_src->
runtime->reference_lifetimes_info) {
213 *ntree_src->
runtime->reference_lifetimes_info);
215 if (
ELEM(reference_set.type,
216 ReferenceSetType::LocalReferenceSet,
217 ReferenceSetType::ClosureInputReferenceSet,
218 ReferenceSetType::ClosureOutputData))
220 reference_set.socket = socket_map.
lookup(reference_set.socket);
222 for (
auto &socket : reference_set.potential_data_origins) {
223 socket = socket_map.
lookup(socket);
258 if (ntree->
runtime->execdata) {
259 switch (ntree->
type) {
265 ntree->
runtime->execdata =
nullptr;
302 BKE_lib_query_idpropertiesForeachIDLink_callback(prop, data);
358 BKE_lib_query_idpropertiesForeachIDLink_callback(prop, data);
382 for (
bNode *node : ntree->all_nodes()) {
388 if (ntree->
runtime->geometry_nodes_eval_dependencies) {
389 for (
ID *&id_ref : ntree->
runtime->geometry_nodes_eval_dependencies->ids.values()) {
404 for (
bNode *node : nodetree->all_nodes()) {
407 function_callback(
id, &key, (&node->storage), 0, user_data);
417 switch (ntree->
type) {
419 for (
bNode *node : ntree->all_nodes()) {
449 if (debug_relationship_assert) {
480 if (stype ==
nullptr) {
485 sock->
runtime = MEM_new<bNodeSocketRuntime>(__func__);
487 sock->
in_out = int(in_out);
504 if (idname ==
"NodeSocketFloat") {
509 return "NodeSocketFloatUnsigned";
511 return "NodeSocketFloatPercentage";
513 return "NodeSocketFloatFactor";
515 return "NodeSocketFloatAngle";
517 return "NodeSocketFloatTime";
519 return "NodeSocketFloatTimeAbsolute";
521 return "NodeSocketFloatDistance";
523 return "NodeSocketFloatWavelength";
525 return "NodeSocketFloatColorTemperature";
527 return "NodeSocketFloatFrequency";
530 if (idname ==
"NodeSocketInt") {
534 return "NodeSocketIntUnsigned";
536 return "NodeSocketIntPercentage";
538 return "NodeSocketIntFactor";
541 if (idname ==
"NodeSocketVector") {
546 return "NodeSocketVectorFactor";
548 return "NodeSocketVectorPercentage";
550 return "NodeSocketVectorTranslation";
552 return "NodeSocketVectorDirection";
554 return "NodeSocketVectorVelocity";
556 return "NodeSocketVectorAcceleration";
558 return "NodeSocketVectorEuler";
617 BLI_addtail(&ntree->outputs_legacy, legacy_socket);
668 for (
bNode *node : ntree.all_nodes()) {
669 node->locx_legacy = node->location[0];
670 node->locy_legacy = node->location[1];
672 node->locx_legacy -= parent->location[0];
673 node->locy_legacy -= parent->location[1];
686 for (
bNode *node : node_tree.all_nodes()) {
687 auto write_input_to_property_bool_char =
688 [&](
const char *identifier,
char &property,
const bool invert =
false) {
698 auto write_input_to_property_bool_short = [&](
const char *identifier,
short &property) {
703 auto write_input_to_property_bool_int16_flag = [&](
const char *identifier,
706 const bool negative =
false) {
716 auto write_input_to_property_int = [&](
const char *identifier,
int &property) {
721 auto write_input_to_property_short = [&](
const char *identifier,
short &property) {
726 auto write_input_to_property_char = [&](
const char *identifier,
char &property) {
731 auto write_input_to_property_int16 = [&](
const char *identifier, int16_t &property) {
736 auto write_input_to_property_float = [&](
const char *identifier,
float &property) {
741 auto write_input_to_property_float_vector =
742 [&](
const char *identifier,
const int index,
float &property) {
747 auto write_input_to_property_float_color =
748 [&](
const char *identifier,
const int index,
float &property) {
755 write_input_to_property_bool_char(
"Diagonal Star", storage->star_45);
759 if (!node->storage) {
763 write_input_to_property_int(
"Flaps", storage->flaps);
764 write_input_to_property_float(
"Angle", storage->angle);
765 write_input_to_property_float(
"Roundness", storage->rounding);
766 write_input_to_property_float(
"Catadioptric Size", storage->catadioptric);
767 write_input_to_property_float(
"Color Shift", storage->lensshift);
771 write_input_to_property_int16(
"Start Frame", node->custom1);
772 write_input_to_property_int16(
"End Frame", node->custom2);
776 if (!node->storage) {
780 write_input_to_property_int(
"Size X", storage->size_x);
781 write_input_to_property_int(
"Size Y", storage->size_y);
782 write_input_to_property_bool_int16_flag(
784 write_input_to_property_bool_int16_flag(
786 write_input_to_property_int16(
"Motion Blur Samples", node->custom2);
787 write_input_to_property_float(
"Motion Blur Shutter", node->custom3);
791 write_input_to_property_bool_int16_flag(
"Switch", node->custom1, 1 << 0);
800 write_input_to_property_bool_int16_flag(
"Invert Color", node->custom1,
CMP_CHAN_RGB);
801 write_input_to_property_bool_int16_flag(
"Invert Alpha", node->custom1,
CMP_CHAN_A);
805 write_input_to_property_bool_int16_flag(
"Use Alpha", node->custom1, 1 << 0);
806 write_input_to_property_bool_int16_flag(
"Anti-Alias", node->custom2, 1 << 0,
true);
811 write_input_to_property_float(
"Key", storage->key);
812 write_input_to_property_float(
"Balance", storage->offset);
813 write_input_to_property_float(
"Gamma", storage->gamma);
814 write_input_to_property_float(
"Intensity", storage->f);
815 write_input_to_property_float(
"Contrast", storage->m);
816 write_input_to_property_float(
"Light Adaptation", storage->a);
817 write_input_to_property_float(
"Chromatic Adaptation", storage->c);
821 write_input_to_property_int16(
"Size", node->custom2);
822 write_input_to_property_float(
"Falloff Size", node->custom3);
826 write_input_to_property_int16(
"Size", node->custom2);
830 write_input_to_property_int16(
"Size", node->custom1);
835 write_input_to_property_bool_char(
"High Precision", storage->high_precision);
836 write_input_to_property_int(
"Uniformity", storage->uniformity);
837 write_input_to_property_float(
"Sharpness", storage->sharpness);
838 write_input_to_property_float(
"Eccentricity", storage->eccentricity);
842 write_input_to_property_float(
"Color Threshold", node->custom3);
843 write_input_to_property_float(
"Neighbor Threshold", node->custom4);
848 write_input_to_property_bool_char(
"HDR", storage->hdr);
852 if (!node->storage) {
856 write_input_to_property_float(
"Threshold", storage->threshold);
857 write_input_to_property_float(
"Corner Rounding", storage->corner_rounding);
865 if (!node->storage) {
869 write_input_to_property_short(
"Samples", storage->
samples);
878 write_input_to_property_float(
"Minimum", storage->t2);
879 write_input_to_property_float(
"Maximum", storage->t1);
883 if (!node->storage) {
887 write_input_to_property_float(
"Minimum", storage->t2);
888 write_input_to_property_float(
"Maximum", storage->t1);
889 write_input_to_property_float(
"Falloff", storage->fstrength);
893 if (!node->storage) {
897 write_input_to_property_float(
"Hue", storage->t1);
898 write_input_to_property_float(
"Saturation", storage->t2);
899 write_input_to_property_float(
"Value", storage->t3);
903 if (!node->storage) {
907 write_input_to_property_float(
"Tolerance", storage->t1);
908 write_input_to_property_float(
"Falloff", storage->t2);
913 write_input_to_property_float(
"Tolerance", storage->t1);
914 write_input_to_property_float(
"Falloff", storage->t2);
918 if (!node->storage) {
922 write_input_to_property_float(
"Minimum", storage->t2);
923 write_input_to_property_float(
"Maximum", storage->t1);
928 write_input_to_property_float(
"Limit Strength", storage->limscale);
929 write_input_to_property_bool_short(
"Use Spill Strength", storage->unspill);
930 write_input_to_property_float_color(
"Spill Strength", 0, storage->uspillr);
931 write_input_to_property_float_color(
"Spill Strength", 1, storage->uspillg);
932 write_input_to_property_float_color(
"Spill Strength", 2, storage->uspillb);
937 write_input_to_property_float(
"Smoothness", storage->smoothness);
942 write_input_to_property_int(
"Preprocess Blur Size", storage->blur_pre);
943 write_input_to_property_float(
"Key Balance", storage->screen_balance);
944 write_input_to_property_int(
"Edge Search Size", storage->edge_kernel_radius);
945 write_input_to_property_float(
"Edge Tolerance", storage->edge_kernel_tolerance);
946 write_input_to_property_float(
"Black Level", storage->clip_black);
947 write_input_to_property_float(
"White Level", storage->clip_white);
948 write_input_to_property_int(
"Postprocess Blur Size", storage->blur_post);
949 write_input_to_property_int(
"Postprocess Dilate Size", storage->dilate_distance);
950 write_input_to_property_int(
"Postprocess Feather Size", storage->feather_distance);
951 write_input_to_property_float(
"Despill Strength", storage->despill_factor);
952 write_input_to_property_float(
"Despill Balance", storage->despill_balance);
956 write_input_to_property_short(
"Index", node->custom1);
957 write_input_to_property_bool_short(
"Anti-Alias", node->custom2);
961 write_input_to_property_bool_short(
"Invert", node->custom2);
966 write_input_to_property_bool_char(
"Motion Blur", storage->flag);
967 write_input_to_property_char(
"Motion Blur Samples", storage->motion_blur_samples);
968 write_input_to_property_float(
"Motion Blur Shutter", storage->motion_blur_shutter);
972 if (!node->storage) {
976 write_input_to_property_float(
"Master Saturation", storage->master.saturation);
977 write_input_to_property_float(
"Master Contrast", storage->master.contrast);
978 write_input_to_property_float(
"Master Gamma", storage->master.gamma);
979 write_input_to_property_float(
"Master Gain", storage->master.gain);
980 write_input_to_property_float(
"Master Lift", storage->master.lift);
981 write_input_to_property_float(
"Shadows Saturation", storage->shadows.saturation);
982 write_input_to_property_float(
"Shadows Contrast", storage->shadows.contrast);
983 write_input_to_property_float(
"Shadows Gamma", storage->shadows.gamma);
984 write_input_to_property_float(
"Shadows Gain", storage->shadows.gain);
985 write_input_to_property_float(
"Shadows Lift", storage->shadows.lift);
986 write_input_to_property_float(
"Midtones Saturation", storage->midtones.saturation);
987 write_input_to_property_float(
"Midtones Contrast", storage->midtones.contrast);
988 write_input_to_property_float(
"Midtones Gamma", storage->midtones.gamma);
989 write_input_to_property_float(
"Midtones Gain", storage->midtones.gain);
990 write_input_to_property_float(
"Midtones Lift", storage->midtones.lift);
991 write_input_to_property_float(
"Highlights Saturation", storage->highlights.saturation);
992 write_input_to_property_float(
"Highlights Contrast", storage->highlights.contrast);
993 write_input_to_property_float(
"Highlights Gamma", storage->highlights.gamma);
994 write_input_to_property_float(
"Highlights Gain", storage->highlights.gain);
995 write_input_to_property_float(
"Highlights Lift", storage->highlights.lift);
996 write_input_to_property_float(
"Midtones Start", storage->startmidtones);
997 write_input_to_property_float(
"Midtones End", storage->endmidtones);
998 write_input_to_property_bool_int16_flag(
"Apply On Red", node->custom1, 1 << 0);
999 write_input_to_property_bool_int16_flag(
"Apply On Green", node->custom1, 1 << 1);
1000 write_input_to_property_bool_int16_flag(
"Apply On Blue", node->custom1, 1 << 2);
1005 write_input_to_property_bool_short(
"Jitter", storage->jit);
1006 write_input_to_property_bool_short(
"Fit", storage->fit);
1011 if (!node->storage) {
1015 write_input_to_property_float_vector(
"Position", 0, storage->x);
1016 write_input_to_property_float_vector(
"Position", 1, storage->y);
1017 write_input_to_property_float_vector(
"Size", 0, storage->width);
1018 write_input_to_property_float_vector(
"Size", 1, storage->height);
1019 write_input_to_property_float(
"Rotation", storage->rotation);
1023 if (!node->storage) {
1027 write_input_to_property_float_vector(
"Position", 0, storage->x);
1028 write_input_to_property_float_vector(
"Position", 1, storage->y);
1029 write_input_to_property_float_vector(
"Size", 0, storage->width);
1030 write_input_to_property_float_vector(
"Size", 1, storage->height);
1031 write_input_to_property_float(
"Rotation", storage->rotation);
1035 if (!node->storage) {
1039 write_input_to_property_float_vector(
"Source", 0, storage->source[0]);
1040 write_input_to_property_float_vector(
"Source", 1, storage->source[1]);
1041 write_input_to_property_float(
"Length", storage->ray_length);
1045 if (!node->storage) {
1049 write_input_to_property_short(
"Samples", storage->iter);
1050 write_input_to_property_float_vector(
"Center", 0, storage->center_x);
1051 write_input_to_property_float_vector(
"Center", 1, storage->center_y);
1052 write_input_to_property_float(
"Translation Amount", storage->distance);
1053 write_input_to_property_float(
"Translation Direction", storage->angle);
1054 write_input_to_property_float(
"Rotation", storage->spin);
1062 if (!node->storage) {
1070 storage->sigma_space = 1.0f;
1080 if (!node->storage) {
1083 write_input_to_property_bool_short(
"Straight Alpha", node->custom1);
1087 write_input_to_property_bool_int16_flag(
"Extend Bounds", node->custom1, (1 << 1));
1091 if (!node->storage) {
1094 write_input_to_property_bool_int16_flag(
"Alpha Crop", node->custom1, (1 << 0),
true);
1097 write_input_to_property_int16(
"X", storage->
x1);
1098 write_input_to_property_int16(
"Y", storage->
y2);
1112 if (!node->storage) {
1121 *node,
SOCK_IN,
"Color Lift");
1130 *node,
SOCK_IN,
"Base Gamma");
1132 *node,
SOCK_IN,
"Color Gamma");
1143 *node,
SOCK_IN,
"Color Gain");
1152 *node,
SOCK_IN,
"Base Power");
1154 *node,
SOCK_IN,
"Color Power");
1163 *node,
SOCK_IN,
"Base Slope");
1165 *node,
SOCK_IN,
"Color Slope");
1174 *node,
SOCK_IN,
"Base Offset");
1176 *node,
SOCK_IN,
"Color Offset");
1182 write_input_to_property_float(
"Input Temperature", storage->input_temperature);
1183 write_input_to_property_float(
"Input Tint", storage->input_tint);
1184 write_input_to_property_float(
"Output Temperature", storage->output_temperature);
1185 write_input_to_property_float(
"Output Tint", storage->output_tint);
1189 write_input_to_property_bool_int16_flag(
"Extend Bounds", node->custom1, (1 << 1));
1192 write_input_to_property_bool_char(
"Separable", storage->
bokeh,
true);
1195 storage->
sizex = int(
1197 storage->
sizey = int(
1206 if (flip_x && flip_y) {
1229 if (!node.
typeinfo->storagename.empty()) {
1389 switch (ndg->
type) {
1391 ndg->angle = ndg->streaks;
1394 ndg->angle = ndg->star_45;
1406 Span{storage.capture_items, storage.capture_items_num})
1408 if (item.identifier == 0) {
1411 storage.data_type_legacy = item.data_type;
1474 for (
bNode *node : ntree->all_nodes()) {
1480 node->custom1 =
data->parametrization;
1496 writer,
bNodePanelState, node->num_panel_states, node->panel_states_array);
1498 if (node->storage) {
1545 ntree->
runtime->execdata =
nullptr;
1703template<
typename T,
typename T_404>
1709 T_404 *orig_data =
static_cast<T_404 *
>(*raw_data);
1710 *raw_data =
nullptr;
1714 copy_fn(*final_data, *orig_data);
1715 *dest_data = final_data;
1810 dest.subtype = src.subtype;
1811 dest.value = src.value;
1824 dest.subtype = src.subtype;
1856 dest.subtype = src.subtype;
1857 dest.value = src.value;
1870 dest.subtype = src.subtype;
1871 STRNCPY(dest.value, src.value);
1890 dest.value = src.value;
1901 dest.value = src.value;
1921 dest.value = src.value;
1932 copy_v3_v3(dest.value_euler, src.value_euler);
1942 dest.value = src.value;
2024 sock->
runtime = MEM_new<bNodeSocketRuntime>(__func__);
2037 if (link->fromsock == sock || link->tosock == sock) {
2040 link->tosock->link =
nullptr;
2048 MEM_delete(sock->runtime);
2104 npd->
pd = dna::shallow_zero_initialize();
2120 iuser->
scene =
nullptr;
2133 iuser->
scene =
nullptr;
2166 "Fixing root node tree '%s' owned by '%s' missing EMBEDDED tag, please consider "
2167 "re-saving your (startup) file",
2178 ntree->
runtime = MEM_new<bNodeTreeRuntime>(__func__);
2186 node->runtime = MEM_new<bNodeRuntime>(__func__);
2187 node->typeinfo =
nullptr;
2188 node->runtime->index_in_tree =
i;
2192 if (node->identifier == 0 || ntree->
runtime->nodes_by_id.contains_as(node->identifier)) {
2196 ntree->
runtime->nodes_by_id.add_new(node);
2202 reader,
bNodePanelState, node->num_panel_states, &node->panel_states_array);
2282 if (!node->is_group()) {
2299 node_tree.ensure_interface_cache();
2301 auto *prop =
idprop::create(socket->name ? socket->name :
"", socket->socket_type).release();
2307 auto *prop =
idprop::create(socket->name ? socket->name :
"", socket->socket_type).release();
2315 auto property =
idprop::create(
"geometry_node_asset_traits_flag",
2402 while (sockdef->
type != -1) {
2409 while (sockdef->
type != -1) {
2451 if (add_sockets_before_init) {
2460 ntree->
typeinfo->node_add_init(ntree, node);
2463 if (!add_sockets_before_init) {
2553 const bool unregister)
2565 for (
bNode *node : ntree->all_nodes()) {
2590 for (
bNode *node : ntree.all_nodes()) {
2849 if (stype.
label[0] ==
'\0') {
2870 if (sock->identifier == identifier) {
2891 if (socket->is_available() && socket->name == name) {
2918 if (identifier[0] !=
'\0') {
2930 if (sock->identifier == check_name) {
2939 sizeof(auto_identifier));
2942 sock->
runtime = MEM_new<bNodeSocketRuntime>(__func__);
3015 return default_value.
value !=
nullptr;
3020 return default_value.
value !=
nullptr;
3026 return default_value.
value !=
nullptr;
3032 return default_value.
value !=
nullptr;
3038 return default_value.
value !=
nullptr;
3128 if (!idname.has_value()) {
3129 CLOG_ERROR(&
LOG,
"static node socket type %d undefined", type);
3169 const std::optional<int> dimensions)
3177 return "NodeSocketFloatUnsigned";
3179 return "NodeSocketFloatPercentage";
3181 return "NodeSocketFloatFactor";
3183 return "NodeSocketFloatAngle";
3185 return "NodeSocketFloatTime";
3187 return "NodeSocketFloatTimeAbsolute";
3189 return "NodeSocketFloatDistance";
3191 return "NodeSocketFloatWavelength";
3193 return "NodeSocketFloatColorTemperature";
3195 return "NodeSocketFloatFrequency";
3198 return "NodeSocketFloat";
3203 return "NodeSocketIntUnsigned";
3205 return "NodeSocketIntPercentage";
3207 return "NodeSocketIntFactor";
3210 return "NodeSocketInt";
3213 return "NodeSocketBool";
3215 return "NodeSocketRotation";
3217 return "NodeSocketMatrix";
3219 if (!dimensions.has_value() || dimensions.value() == 3) {
3222 return "NodeSocketVectorFactor";
3224 return "NodeSocketVectorPercentage";
3226 return "NodeSocketVectorTranslation";
3228 return "NodeSocketVectorDirection";
3230 return "NodeSocketVectorVelocity";
3232 return "NodeSocketVectorAcceleration";
3234 return "NodeSocketVectorEuler";
3236 return "NodeSocketVectorXYZ";
3239 return "NodeSocketVector";
3242 else if (dimensions.value() == 2) {
3245 return "NodeSocketVectorFactor2D";
3247 return "NodeSocketVectorPercentage2D";
3249 return "NodeSocketVectorTranslation2D";
3251 return "NodeSocketVectorDirection2D";
3253 return "NodeSocketVectorVelocity2D";
3255 return "NodeSocketVectorAcceleration2D";
3257 return "NodeSocketVectorEuler2D";
3259 return "NodeSocketVectorXYZ2D";
3262 return "NodeSocketVector2D";
3265 else if (dimensions.value() == 4) {
3268 return "NodeSocketVectorFactor4D";
3270 return "NodeSocketVectorPercentage4D";
3272 return "NodeSocketVectorTranslation4D";
3274 return "NodeSocketVectorDirection4D";
3276 return "NodeSocketVectorVelocity4D";
3278 return "NodeSocketVectorAcceleration4D";
3280 return "NodeSocketVectorEuler4D";
3282 return "NodeSocketVectorXYZ4D";
3285 return "NodeSocketVector4D";
3290 return "NodeSocketVector";
3293 return "NodeSocketColor";
3297 return "NodeSocketStringFilePath";
3299 return "NodeSocketString";
3302 return "NodeSocketShader";
3304 return "NodeSocketObject";
3306 return "NodeSocketImage";
3308 return "NodeSocketGeometry";
3310 return "NodeSocketCollection";
3312 return "NodeSocketTexture";
3314 return "NodeSocketMaterial";
3316 return "NodeSocketMenu";
3318 return "NodeSocketBundle";
3320 return "NodeSocketClosure";
3324 return std::nullopt;
3328 const int type,
const int subtype,
const std::optional<int> dimensions)
3334 return "NodeTreeInterfaceSocketFloatUnsigned";
3336 return "NodeTreeInterfaceSocketFloatPercentage";
3338 return "NodeTreeInterfaceSocketFloatFactor";
3340 return "NodeTreeInterfaceSocketFloatAngle";
3342 return "NodeTreeInterfaceSocketFloatTime";
3344 return "NodeTreeInterfaceSocketFloatTimeAbsolute";
3346 return "NodeTreeInterfaceSocketFloatDistance";
3348 return "NodeTreeInterfaceSocketFloatWavelength";
3350 return "NodeTreeInterfaceSocketFloatColorTemperature";
3352 return "NodeTreeInterfaceSocketFloatFrequency";
3355 return "NodeTreeInterfaceSocketFloat";
3360 return "NodeTreeInterfaceSocketIntUnsigned";
3362 return "NodeTreeInterfaceSocketIntPercentage";
3364 return "NodeTreeInterfaceSocketIntFactor";
3367 return "NodeTreeInterfaceSocketInt";
3370 return "NodeTreeInterfaceSocketBool";
3372 return "NodeTreeInterfaceSocketRotation";
3374 return "NodeTreeInterfaceSocketMatrix";
3376 if (!dimensions.has_value() || dimensions.value() == 3) {
3379 return "NodeTreeInterfaceSocketVectorFactor";
3381 return "NodeTreeInterfaceSocketVectorPercentage";
3383 return "NodeTreeInterfaceSocketVectorTranslation";
3385 return "NodeTreeInterfaceSocketVectorDirection";
3387 return "NodeTreeInterfaceSocketVectorVelocity";
3389 return "NodeTreeInterfaceSocketVectorAcceleration";
3391 return "NodeTreeInterfaceSocketVectorEuler";
3393 return "NodeTreeInterfaceSocketVectorXYZ";
3396 return "NodeTreeInterfaceSocketVector";
3399 else if (dimensions.value() == 2) {
3402 return "NodeTreeInterfaceSocketVectorFactor2D";
3404 return "NodeTreeInterfaceSocketVectorPercentage2D";
3406 return "NodeTreeInterfaceSocketVectorTranslation2D";
3408 return "NodeTreeInterfaceSocketVectorDirection2D";
3410 return "NodeTreeInterfaceSocketVectorVelocity2D";
3412 return "NodeTreeInterfaceSocketVectorAcceleration2D";
3414 return "NodeTreeInterfaceSocketVectorEuler2D";
3416 return "NodeTreeInterfaceSocketVectorXYZ2D";
3419 return "NodeTreeInterfaceSocketVector2D";
3422 else if (dimensions.value() == 4) {
3425 return "NodeTreeInterfaceSocketVectorFactor4D";
3427 return "NodeTreeInterfaceSocketVectorPercentage4D";
3429 return "NodeTreeInterfaceSocketVectorTranslation4D";
3431 return "NodeTreeInterfaceSocketVectorDirection4D";
3433 return "NodeTreeInterfaceSocketVectorVelocity4D";
3435 return "NodeTreeInterfaceSocketVectorAcceleration4D";
3437 return "NodeTreeInterfaceSocketVectorEuler4D";
3439 return "NodeTreeInterfaceSocketVectorXYZ4D";
3442 return "NodeTreeInterfaceSocketVector4D";
3447 return "NodeTreeInterfaceSocketVector";
3450 return "NodeTreeInterfaceSocketColor";
3454 return "NodeTreeInterfaceSocketStringFilePath";
3456 return "NodeTreeInterfaceSocketString";
3459 return "NodeTreeInterfaceSocketShader";
3461 return "NodeTreeInterfaceSocketObject";
3463 return "NodeTreeInterfaceSocketImage";
3465 return "NodeTreeInterfaceSocketGeometry";
3467 return "NodeTreeInterfaceSocketCollection";
3469 return "NodeTreeInterfaceSocketTexture";
3471 return "NodeTreeInterfaceSocketMaterial";
3473 return "NodeTreeInterfaceSocketMenu";
3475 return "NodeTreeInterfaceSocketBundle";
3477 return "NodeTreeInterfaceSocketClosure";
3481 return std::nullopt;
3512 return "Collection";
3526 return std::nullopt;
3539 if (!idname.has_value()) {
3540 CLOG_ERROR(&
LOG,
"static node socket type %d undefined", type);
3562 if (default_value_menu.enum_items) {
3564 default_value_menu.enum_items->remove_user_and_delete_if_last();
3583 if (link->fromsock == &sock || link->tosock == &sock) {
3591 node.
runtime->internal_links.remove_and_reorder(
i);
3609 return reinterpret_cast<bNode *
>(
3615 ntree.ensure_topology_cache();
3616 return socket.owner_node();
3621 ntree.ensure_topology_cache();
3622 return socket.owner_node();
3627 for (
bNode *node : ntree.all_nodes()) {
3630 if (socket_iter == &socket) {
3641 ntree.ensure_interface_cache();
3643 if (
input->identifier == identifier) {
3652 bNode *parent_iter = &node;
3653 while (parent_iter->
parent !=
nullptr) {
3654 parent_iter = parent_iter->
parent;
3656 if (!parent_iter->is_frame()) {
3664 for (
const bNode *child_iter = &child; child_iter; child_iter = child_iter->
parent) {
3665 if (child_iter == &parent) {
3673 const bNode *node_start,
3674 bool (*callback)(
bNode *,
bNode *,
void *,
const bool),
3676 const bool reversed)
3686 if (link->fromnode != node_start) {
3691 if (link->tonode != node_start) {
3696 if (!callback(link->fromnode, link->tonode, userdata, reversed)) {
3700 ntree, reversed ? link->fromnode : link->tonode, callback, userdata, reversed);
3705 const bNode *node_start,
3708 const char recursion_mask)
3712 if (link ==
nullptr) {
3733 const bNode *node_start,
3736 const int recursion_lvl)
3744 const char recursion_mask = (1 << recursion_lvl);
3748 node->runtime->iter_flag &= ~recursion_mask;
3757 if (!callback(node->
parent, userdata)) {
3778 while (ntree.
runtime->nodes_by_id.contains_as(new_id) || new_id <= 0) {
3783 ntree.
runtime->nodes_by_id.add_new(&node);
3784 node.
runtime->index_in_tree = ntree.
runtime->nodes_by_id.index_range().last();
3791 node->
runtime = MEM_new<bNodeRuntime>(__func__);
3794 node->
ui_order = ntree.all_nodes().size();
3806 std::optional<StringRefNull> idname;
3811 if (ntype->type_legacy != type) {
3815 const char *disabled_hint;
3816 if (ntype->poll && ntype->poll(ntype, &ntree, &disabled_hint)) {
3817 idname = ntype->idname;
3830 sock_dst->
runtime = MEM_new<bNodeSocketRuntime>(__func__);
3831 if (sock_src->
prop) {
3844 if (default_value_menu.enum_items) {
3846 default_value_menu.enum_items->add_user();
3858 const bNode &node_src,
3860 const bool use_unique,
3864 *node_dst = node_src;
3866 node_dst->
runtime = MEM_new<bNodeRuntime>(__func__);
3882 socket_map.
add_new(src_socket, dst_socket);
3890 socket_map.
add_new(src_socket, dst_socket);
3893 if (node_src.
prop) {
3900 node_dst->
runtime->internal_links = node_src.
runtime->internal_links;
3903 dst_link.
tonode = node_dst;
3913 node_src.
typeinfo->copyfunc(dst_tree, node_dst, &node_src);
3924 reinterpret_cast<ID *
>(dst_tree), &RNA_Node, node_dst);
3926 node_dst->
typeinfo->copyfunc_api(&
ptr, &node_src);
3938 if (!socket.is_output()) {
3948 ->default_value_typed<bNodeSocketValueFloat>()
4015 tree.ensure_topology_cache();
4017 bNode &dst_node = dst.owner_node();
4018 bNode &src_node = src.owner_node();
4025 if (src.is_multi_input()) {
4029 if (dst_node.is_reroute() || src_node.is_reroute()) {
4033 if (&src_type != &dst_type) {
4034 if (!convert.is_convertible(src_type, dst_type)) {
4041 dst_node.is_type(
"FunctionNodeInputString"))
4052 if (!dst_value || !src_value) {
4056 convert.convert_to_uninitialized(src_type, dst_type, src_value, dst_value);
4080 if (
ELEM(socket, link->fromsock, link->tosock)) {
4090 BLI_assert(ntree.all_nodes().contains(&fromnode));
4091 BLI_assert(ntree.all_nodes().contains(&tonode));
4111 link->
tonode = &fromnode;
4112 link->
tosock = &fromsock;
4117 if (link !=
nullptr && link->
tosock->is_multi_input()) {
4143 const bool was_muted = link.is_muted();
4145 if (muted != was_muted) {
4153 if (link->fromsock == &sock || link->tosock == &sock) {
4161 return !(link.
fromsock->is_visible() && link.
tosock->is_visible());
4173 const int deleted_index)
4178 if (link->tosock != sock || link->multi_input_sort_id <= deleted_index) {
4181 link->multi_input_sort_id -= 1;
4204 if (fromlink ==
nullptr) {
4205 if (link->
tosock->is_multi_input()) {
4213 if (link->
tosock->is_multi_input()) {
4216 if (link_to_compare->fromsock == fromlink->
fromsock &&
4217 link_to_compare->tosock == link->
tosock)
4220 &ntree, link_to_compare->tosock, link_to_compare->multi_input_sort_id);
4243 for (
bNodeLink *link : duplicate_links_to_remove) {
4249 if (link->
tonode == &node) {
4273 const bNode &to_node,
4282 offset_x = -(from_node.
typeinfo->width + 50);
4287 offset_x = to_node.
typeinfo->width + 50;
4293 float offset_y =
U.widget_unit * tot_sock_idx;
4308 offset_y -=
U.widget_unit * tot_sock_idx;
4317 if (socket->link !=
nullptr) {
4326 std::optional<Library *> owner_library,
4328 const bool is_embedded,
4336 if (is_embedded || bmain ==
nullptr) {
4340 "Embedded NTrees should never have a defined owner library here");
4350 *ntree_owner_ptr = ntree;
4429 if (xsize == 0 || ysize == 0) {
4451 this->
ibuf = other.ibuf;
4452 other.ibuf =
nullptr;
4468 for (
bNode *node : ntree->all_nodes()) {
4476 if (node->is_group() && group !=
nullptr) {
4493 for (
bNode *node : ntree->all_nodes()) {
4500 if (node->is_group()) {
4519 if (remove_old || to_ntree->
runtime->previews.is_empty()) {
4520 to_ntree->
runtime->previews.clear();
4521 to_ntree->
runtime->previews = std::move(from_ntree->
runtime->previews);
4525 for (
const auto &item : from_ntree->
runtime->previews.items()) {
4526 to_ntree->
runtime->previews.add(item.key, std::move(item.value));
4528 from_ntree->
runtime->previews.clear();
4536 if (link->fromnode == &node) {
4539 else if (link->tonode == &node) {
4545 if (link->tonode != &node && link->tosock->is_multi_input()) {
4547 &ntree, link->tosock, link->multi_input_sort_id);
4550 if (link->fromsock == sock || link->tosock == sock) {
4561 for (
bNode *node : ntree->all_nodes()) {
4562 if (node->
parent == parent) {
4571 node_tree.
runtime->nodes_by_id.clear();
4574 node_tree.
runtime->nodes_by_id.add_new(node);
4592 ntree->
runtime->execdata =
nullptr;
4619 if (node.
runtime->declaration) {
4623 delete node.
runtime->declaration;
4650 Main *bmain,
bNodeTree &ntree,
bNode &node,
const bool do_id_user,
const bool remove_animation)
4677 if (remove_animation) {
4682 SNPRINTF(prefix,
"nodes[\"%s\"]", propname_esc);
4685 if (bmain !=
nullptr) {
4711 if (node->is_group() && ngroup !=
nullptr) {
4750 if (node->is_type(
"CompositorNodeOutputFile")) {
4753 const bool node_is_output = node->is_type(
"CompositorNodeViewer") ||
4754 node->is_type(
"GeometryNodeViewer");
4765 const bool tnode_is_output = tnode->is_type(
"CompositorNodeViewer") ||
4766 tnode->is_type(
"GeometryNodeViewer");
4767 const bool viewer_case = (is_compositor || is_geometry) && tnode_is_output &&
4769 const bool has_same_shortcut = viewer_case && node != tnode &&
4773 if (tnode->type_legacy == node->
type_legacy || viewer_case) {
4781 if (has_same_shortcut) {
4787 if (
output == 0 && !is_geometry) {
4793 if (node->is_group_output()) {
4796 if (!tnode->is_group_output()) {
4822 switch (
GS(
id->name)) {
4824 return &
reinterpret_cast<Material *
>(
id)->nodetree;
4826 return &
reinterpret_cast<Light *
>(
id)->nodetree;
4828 return &
reinterpret_cast<World *
>(
id)->nodetree;
4830 return &
reinterpret_cast<Tex *
>(
id)->nodetree;
4832 return &
reinterpret_cast<Scene *
>(
id)->nodetree;
4843 return (nodetree !=
nullptr) ? *nodetree :
nullptr;
4848 for (
bNode *node : ntree.all_nodes()) {
4860 if (ntree ==
nullptr) {
4878 if (node->is_group() && group !=
nullptr) {
4888 while (node_src !=
nullptr) {
4889 node_local->
runtime->original = node_src;
4890 node_src = node_src->
next;
4891 node_local = node_local->
next;
4895 ntree->
typeinfo->localize(ltree, ntree);
4903 if (ntree && localtree) {
4904 if (ntree->
typeinfo->local_merge) {
4905 ntree->
typeinfo->local_merge(bmain, localtree, ntree);
4914 if (&tree_to_search_in == &tree_to_search_for) {
4918 tree_to_search_in.ensure_topology_cache();
4919 for (
const bNode *node_group : tree_to_search_in.group_nodes()) {
4920 const bNodeTree *sub_tree_search_in =
reinterpret_cast<const bNodeTree *
>(node_group->id);
4921 if (!sub_tree_search_in) {
4924 if (!already_passed.
add(sub_tree_search_in)) {
4938 if (&tree_to_search_in == &tree_to_search_for) {
4950 if (link->fromsock == &sock || link->tosock == &sock) {
4959 for (
bNode *node : ntree.all_nodes()) {
4969 bool changed =
false;
4991 for (
bNode *node : ntree.all_nodes()) {
5005 for (
bNode *tnode : ntree.all_nodes()) {
5006 tnode->flag &= ~flags_to_set;
5008 node.
flag |= flags_to_set;
5013 if (is_available == sock.is_available()) {
5027 if (sock.is_multi_input()) {
5047 socket->runtime->declaration = &socket_decl;
5054 socket->runtime->declaration =
nullptr;
5061 if (node->
runtime->declaration->skip_updating_sockets) {
5072 if (node.
runtime->declaration !=
nullptr) {
5076 if (node.
typeinfo->static_declaration) {
5077 if (!node.
typeinfo->static_declaration->is_context_dependent) {
5112 *r_links = node.
runtime->internal_links.data();
5113 *r_len = node.
runtime->internal_links.size();
5129 while ((c = *
str++)) {
5157 result.add(ntype->type_legacy);
5184 const std::string old_idname = node->
idname;
5200 for (
bNode *node : ntree->all_nodes()) {
5219 if (
id ==
nullptr) {
5223 bool need_update =
false;
5227 for (
bNode *node : ntree->all_nodes()) {
5228 if (node->
id ==
id) {
5244 if (node.
label[0] !=
'\0') {
5251 return label_buffer;
5259 if (sock.
runtime->declaration !=
nullptr) {
5262 return sock.
runtime->declaration->short_label.data();
5265 return std::nullopt;
5292 const char **r_disabled_hint)
5299 static std::atomic<int> next_legacy_type = []() {
5305 const int new_type = next_legacy_type.fetch_add(1);
5306 BLI_assert(new_type <= std::numeric_limits<int16_t>::max());
5312 ntype.
idname = std::move(idname);
5314 if (!legacy_type.has_value()) {
5375 return std::nullopt;
5403 return std::nullopt;
5454 if (type.
is<
float>()) {
5457 if (type.
is<
int>()) {
5466 if (type.
is<
bool>()) {
5475 if (type.
is<std::string>()) {
5484 return std::nullopt;
5499 return std::nullopt;
5515 return std::nullopt;
5521 const char defname[],
5527 if (ntemp_iter != ntemp) {
5528 if (ntemp_iter->identifier == check_name) {
5552 ntemp->identifier[0] =
'\0';
5556 STRNCPY(ntemp->identifier, ntemp->name);
5563 ntemp->identifier[0] =
'\0';
5567 STRNCPY(ntemp->identifier, ntemp->name);
5575 ntype.
width = width;
5577 if (maxwidth <= minwidth) {
5604 const std::optional<StringRefNull> storagename,
5605 void (*freefunc)(
bNode *node),
5608 const bNode *src_node))
5626 if (nt->rna_ext.free) {
5627 nt->rna_ext.free(nt->rna_ext.data);
5634 if (st->ext_socket.free) {
5635 st->ext_socket.free(st->ext_socket.data);
5637 if (st->ext_interface.free) {
5638 st->ext_interface.free(st->ext_interface.data);
5645 if (nt->rna_ext.free) {
5646 nt->rna_ext.free(nt->rna_ext.data);
5669 *r_nodetree = &node_tree;
5670 *r_id = &node_tree.
id;
5674 if (ntreeiter->
scene) {
5676 *r_id = &ntreeiter->
scene->
id;
5680 if (ntreeiter->
mat) {
5682 *r_id = &ntreeiter->
mat->
id;
5686 if (ntreeiter->
tex) {
5688 *r_id = &ntreeiter->
tex->
id;
5692 if (ntreeiter->
light) {
5694 *r_id = &ntreeiter->
light->
id;
5698 if (ntreeiter->
world) {
5700 *r_id = &ntreeiter->
world->
id;
5718 for (
bNode *node : ntree->all_nodes()) {
5720 if (node->
custom1 == layer_index) {
5723 else if (node->
custom1 > layer_index) {
void BKE_animdata_free(ID *id, bool do_id_user)
bool BKE_animdata_fix_paths_remove(struct ID *id, const char *prefix)
void BKE_asset_metadata_idprop_ensure(AssetMetaData *asset_data, IDProperty *prop)
bool BKE_bpath_foreach_path_fixed_process(BPathForeachPathData *bpath_data, char *path, size_t path_maxncpy)
void IDP_foreach_property(IDProperty *id_property_root, int type_filter, blender::FunctionRef< void(IDProperty *id_property)> callback)
#define IDP_BlendDataRead(reader, prop)
void IDP_FreeProperty(IDProperty *prop)
void IDP_FreePropertyContent_ex(IDProperty *prop, bool do_id_user)
bool IDP_AddToGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL()
IDProperty * IDP_CopyProperty_ex(const IDProperty *prop, int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
IDProperty * IDP_CopyProperty(const IDProperty *prop) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
void IDP_BlendWrite(BlendWriter *writer, const IDProperty *prop)
void IDP_FreeProperty_ex(IDProperty *prop, bool do_id_user)
void(*)(ID *id, const IDCacheKey *cache_key, void **cache_p, uint flags, void *user_data) IDTypeForeachCacheFunctionCallback
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
@ LIB_ID_CREATE_NO_USER_REFCOUNT
@ LIB_ID_COPY_NO_ANIMDATA
struct ID * BKE_id_copy_in_lib(Main *bmain, std::optional< Library * > owner_library, const ID *id, std::optional< const ID * > new_owner_id, ID **new_id_p, int flag)
void BKE_libblock_free_data_py(ID *id)
void BKE_libblock_free_data(ID *id, bool do_id_user) ATTR_NONNULL()
void BKE_libblock_init_empty(ID *id) ATTR_NONNULL(1)
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
void * BKE_libblock_alloc_in_lib(Main *bmain, std::optional< Library * > owner_library, short type, const char *name, int flag) ATTR_WARN_UNUSED_RESULT
void BKE_id_blend_write(BlendWriter *writer, ID *id)
#define BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(data_, func_call_)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
@ IDWALK_CB_READFILE_IGNORE
#define BKE_LIB_FOREACHID_PROCESS_ID(data_, id_, cb_flag_)
#define NODE_CLASS_OUTPUT
constexpr int GROUP_NODE_DEFAULT_WIDTH
#define NODE_CUSTOM_GROUP
#define NODE_CLASS_CONVERTER
#define NODE_LEGACY_TYPE_GENERATION_START
constexpr int NODE_DEFAULT_MAX_WIDTH
#define FOREACH_NODETREE_END
#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id)
#define SH_NODE_CURVE_FLOAT
#define CMP_NODE_COLOR_SPILL
#define CMP_NODE_DESPECKLE
#define CMP_NODE_LUMA_MATTE
#define CMP_NODE_KEYINGSCREEN
#define CMP_NODE_MASK_ELLIPSE
#define SH_NODE_TEX_IMAGE
#define CMP_NODE_CRYPTOMATTE
#define CMP_NODE_BILATERALBLUR
#define CMP_NODE_MOVIEDISTORTION
#define CMP_NODE_COLORBALANCE
#define CMP_NODE_BOKEHIMAGE
#define FN_NODE_INPUT_COLOR
#define CMP_NODE_KUWAHARA
#define CMP_NODE_DIFF_MATTE
#define FN_NODE_INPUT_VECTOR
#define SH_NODE_TEX_ENVIRONMENT
#define SH_NODE_CURVE_VEC
#define CMP_NODE_ALPHAOVER
#define CMP_NODE_HUECORRECT
#define CMP_NODE_CHROMA_MATTE
#define CMP_NODE_PLANETRACKDEFORM
#define CMP_NODE_DILATEERODE
#define CMP_NODE_BOKEHBLUR
#define CMP_NODE_LENSDIST
#define FN_NODE_INPUT_INT
#define CMP_NODE_ZCOMBINE
#define FN_NODE_INPUT_BOOL
#define CMP_NODE_CRYPTOMATTE_LEGACY
#define CMP_NODE_OUTPUT_FILE
#define CMP_NODE_COLORCORRECTION
#define SH_NODE_BSDF_HAIR_PRINCIPLED
#define CMP_NODE_CURVE_RGB
#define CMP_NODE_STABILIZE2D
#define CMP_NODE_PIXELATE
#define SH_NODE_TEX_POINTDENSITY
#define SH_NODE_CURVE_RGB
#define GEO_NODE_CAPTURE_ATTRIBUTE
#define CMP_NODE_MASK_BOX
#define TEX_NODE_CURVE_TIME
#define CMP_NODE_ANTIALIASING
#define CMP_NODE_R_LAYERS
#define CMP_NODE_CURVE_VEC
#define CMP_NODE_COLOR_MATTE
#define CMP_NODE_DIST_MATTE
#define CMP_NODE_SUNBEAMS
#define TEX_NODE_CURVE_RGB
#define CMP_NODE_CHANNEL_MATTE
void BKE_ntree_update_tag_node_new(bNodeTree *ntree, bNode *node)
void BKE_ntree_update_tag_socket_type(bNodeTree *ntree, bNodeSocket *socket)
void BKE_ntree_update_tag_node_internal_link(bNodeTree *ntree, bNode *node)
void BKE_ntree_update_tag_all(bNodeTree *ntree)
void BKE_ntree_update_tag_link_changed(bNodeTree *ntree)
void BKE_ntree_update_tag_socket_new(bNodeTree *ntree, bNodeSocket *socket)
void BKE_ntree_update_tag_socket_removed(bNodeTree *ntree)
void BKE_ntree_update_tag_missing_runtime_data(bNodeTree *ntree)
void BKE_ntree_update_tag_link_removed(bNodeTree *ntree)
void BKE_ntree_update_tag_socket_availability(bNodeTree *ntree, bNodeSocket *socket)
void BKE_ntree_update_tag_node_type(bNodeTree *ntree, bNode *node)
void BKE_ntree_update(Main &bmain, std::optional< blender::Span< bNodeTree * > > modified_trees=std::nullopt, const NodeTreeUpdateExtraParams ¶ms={})
void BKE_ntree_update_tag_node_removed(bNodeTree *ntree)
void BKE_ntree_update_tag_node_property(bNodeTree *ntree, bNode *node)
void BKE_ntree_update_tag_link_added(bNodeTree *ntree, bNodeLink *link)
void BKE_ntree_update_tag_link_mute(bNodeTree *ntree, bNodeLink *link)
void BKE_ntree_update_tag_parent_change(bNodeTree *ntree, bNode *node)
void BKE_previewimg_blend_write(BlendWriter *writer, const PreviewImage *prv)
void BKE_previewimg_free(PreviewImage **prv)
void BKE_previewimg_blend_read(BlendDataReader *reader, PreviewImage *prv)
void BKE_previewimg_id_copy(ID *new_id, const ID *old_id)
@ VOLUME_GRID_VECTOR_FLOAT
#define BLI_assert_unreachable()
#define BLI_assert_msg(a, msg)
unsigned int BLI_ghashutil_strhash_p(const void *ptr)
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
#define LISTBASE_FOREACH(type, var, list)
BLI_INLINE void BLI_listbase_clear(ListBase *lb)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
BLI_INLINE bool BLI_listbase_is_empty(const ListBase *lb)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void void BLI_freelistN(ListBase *listbase) ATTR_NONNULL(1)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
#define LISTBASE_FOREACH_INDEX(type, var, list, index_var)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
int BLI_listbase_count(const ListBase *listbase) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
MINLINE void copy_v4_v4(float r[4], const float a[4])
MINLINE void copy_v3_v3(float r[3], const float a[3])
#define SNPRINTF(dst, format,...)
char * BLI_strdup_null(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_MALLOC
char * STRNCPY(char(&dst)[N], const char *src)
size_t BLI_str_escape(char *__restrict dst, const char *__restrict src, size_t dst_maxncpy) ATTR_NONNULL(1
size_t void BLI_uniquename_cb(blender::FunctionRef< bool(blender::StringRefNull)> unique_check, const char *defname, char delim, char *name, size_t name_maxncpy) ATTR_NONNULL(2
void BLI_uniquename(const struct ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_maxncpy) ATTR_NONNULL(1
Platform independent time functions.
double BLI_time_now_seconds(void)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define BLO_read_data_address(reader, ptr_p)
int BLO_read_fileversion_get(BlendDataReader *reader)
void BLO_write_struct_by_name(BlendWriter *writer, const char *struct_name, const void *data_ptr)
#define BLO_write_id_struct(writer, struct_name, id_address, id)
#define BLO_write_struct(writer, struct_name, data_ptr)
void * BLO_read_struct_by_name_array(BlendDataReader *reader, const char *struct_name, int64_t items_num, const void *old_address)
bool BLO_read_lib_is_undo(BlendLibReader *reader)
void BLO_read_string(BlendDataReader *reader, char **ptr_p)
void BLO_write_string(BlendWriter *writer, const char *data_ptr)
#define BLO_write_struct_array(writer, struct_name, array_size, data_ptr)
#define BLO_read_struct_list(reader, struct_name, list)
#define BLO_read_struct_array(reader, struct_name, array_size, ptr_p)
#define BLO_read_struct(reader, struct_name, ptr_p)
bool BLO_write_is_undo(BlendWriter *writer)
#define BLT_I18NCONTEXT_ID_NODETREE
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
void DEG_relations_tag_update(Main *bmain)
Object groups, one object can be in many groups at once.
@ NODE_INTERFACE_SOCKET_OUTPUT
@ NODE_INTERFACE_SOCKET_HIDE_IN_MODIFIER
@ NODE_INTERFACE_SOCKET_INPUT
@ NODE_INTERFACE_SOCKET_HIDE_VALUE
@ CMP_NODE_MASK_FLAG_NO_FEATHER
@ CMP_NODE_MASK_FLAG_MOTION_BLUR
@ NODE_ACTIVE_PAINT_CANVAS
@ NODE_VIEWER_SHORTCUT_NONE
@ CMP_NODE_LENS_DISTORTION_HORIZONTAL
struct bNodeSocket bNodeSocket
struct RuntimeNodeEnumItemsHandle RuntimeNodeEnumItemsHandle
@ CMP_NODE_GLARE_SIMPLE_STAR
ImBuf * IMB_dupImBuf(const ImBuf *ibuf1)
bool IMB_alloc_byte_pixels(ImBuf *ibuf, bool initialize_pixels=true)
void IMB_freeImBuf(ImBuf *ibuf)
ImBuf * IMB_allocImBuf(unsigned int x, unsigned int y, unsigned char planes, unsigned int flags)
void IMB_rect_size_set(ImBuf *ibuf, const uint size[2])
Read Guarded memory(de)allocation.
void ntreeShaderEndExecTree(struct bNodeTreeExec *exec)
void ntreeTexEndExecTree(struct bNodeTreeExec *exec)
BMesh const char void * data
static DBVT_INLINE btScalar size(const btDbvtVolume &a)
static const CPPType & get()
void destruct(void *ptr) const
void value_initialize(void *ptr) const
const Value * lookup_ptr(const Key &key) const
const Value & lookup(const Key &key) const
Value & lookup_or_add_cb(const Key &key, const CreateValueF &create_value)
void add_new(const Key &key, const Value &value)
static RandomNumberGenerator from_random_seed()
void add_destruct_call(Func func)
bool contains(const Key &key) const
constexpr bool is_empty() const
void copy_utf8_truncated(char *dst, int64_t dst_size) const
constexpr const char * c_str() const
const Key & lookup_key_as(const ForwardKey &key) const
void reserve(const int64_t n)
void add_new(const Key &key)
void append_non_duplicates(const T &value)
std::unique_ptr< node_tree_reference_lifetimes::ReferenceLifetimesInfo > reference_lifetimes_info
std::unique_ptr< nodes::StructureTypeInterface > structure_type_interface
Map< bNodeInstanceKey, bNodePreview > previews
NodeIDVectorSet nodes_by_id
std::unique_ptr< nodes::FieldInferencingInterface > field_inferencing_interface
CCL_NAMESPACE_BEGIN ccl_device float invert(const float color, const float factor)
void * MEM_mallocN(size_t len, const char *str)
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void * MEM_dupallocN(const void *vmemh)
size_t(* MEM_allocN_len)(const void *vmemh)
void MEM_freeN(void *vmemh)
static void write_compositor_legacy_properties(bNodeTree &node_tree)
static void construct_interface_as_legacy_sockets(bNodeTree *ntree)
static bNodeSocket * make_socket(bNodeTree *ntree, const eNodeSocketInOut in_out, const StringRef idname, const StringRef name, const StringRef identifier)
static void legacy_socket_interface_free(bNodeSocket *sock)
static void update_node_location_legacy(bNodeTree &ntree)
static void write_legacy_sockets(BlendWriter *writer, bNodeTree *ntree)
static void cleanup_legacy_sockets(bNodeTree *ntree)
static StringRef get_legacy_socket_subtype_idname(StringRef idname, const void *socket_data)
static void write_node_socket_interface(BlendWriter *writer, const bNodeSocket *sock)
static void write_compositor_legacy_storage(BlendWriter *writer, bNode &node)
std::unique_ptr< IDProperty, IDPropertyDeleter > create(StringRef prop_name, int32_t value, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_INT, set its name and value.
std::unique_ptr< IDProperty, IDPropertyDeleter > create_group(StringRef prop_name, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_GROUP.
T & get_item_as(bNodeTreeInterfaceItem &item)
struct blender::bke::versioning_internal::bNodeSocketValueBoolean_404 bNodeSocketValueBoolean_404
struct blender::bke::versioning_internal::bNodeSocketValueFloat_404 bNodeSocketValueFloat_404
struct blender::bke::versioning_internal::bNodeSocketValueRotation_404 bNodeSocketValueRotation_404
struct blender::bke::versioning_internal::bNodeSocketValueString_404 bNodeSocketValueString_404
struct blender::bke::versioning_internal::bNodeSocketValueVector_404 bNodeSocketValueVector_404
struct blender::bke::versioning_internal::bNodeSocketValueCollection_404 bNodeSocketValueCollection_404
struct blender::bke::versioning_internal::bNodeSocketValueTexture_404 bNodeSocketValueTexture_404
struct blender::bke::versioning_internal::bNodeSocketValueRGBA_404 bNodeSocketValueRGBA_404
struct blender::bke::versioning_internal::bNodeSocketValueMenu_404 bNodeSocketValueMenu_404
struct blender::bke::versioning_internal::bNodeSocketValueInt_404 bNodeSocketValueInt_404
struct blender::bke::versioning_internal::bNodeSocketValueImage_404 bNodeSocketValueImage_404
constexpr int MIN_BLENDFILE_VERSION_FOR_MODERN_NODE_SOCKET_DEFAULT_VALUE_READING
struct blender::bke::versioning_internal::bNodeSocketValueObject_404 bNodeSocketValueObject_404
static void direct_link_node_socket_legacy_data_version_do(void **dest_data, void **raw_data, blender::FunctionRef< void(T &dest, T_404 &source)> copy_fn)
struct blender::bke::versioning_internal::bNodeSocketValueMaterial_404 bNodeSocketValueMaterial_404
void node_unregister_socket_type(bNodeSocketType &stype)
bNode * node_find_node_by_name(bNodeTree &ntree, StringRefNull name)
bNodeSocket * node_find_enabled_input_socket(bNode &node, StringRef name)
void node_position_propagate(bNode &node)
static void node_free_type(void *nodetype_v)
void node_socket_declarations_update(bNode *node)
static void node_preview_init_tree_recursive(Map< bNodeInstanceKey, bNodePreview > &previews, bNodeTree *ntree, bNodeInstanceKey parent_key, const int xsize, const int ysize)
void node_tree_free_local_node(bNodeTree &ntree, bNode &node)
static bool socket_id_user_decrement(bNodeSocket *sock)
void node_tree_set_output(bNodeTree &ntree)
static ID ** node_owner_pointer_get(ID *id, const bool debug_relationship_assert)
void node_modify_socket_type_static(bNodeTree *ntree, bNode *node, bNodeSocket *sock, int type, int subtype)
StringRefNull node_type_find_alias(StringRefNull alias)
bNodeSocketType NodeSocketTypeUndefined
std::string node_label(const bNodeTree &ntree, const bNode &node)
std::optional< eNodeSocketDatatype > geo_nodes_base_cpp_type_to_socket_type(const CPPType &type)
void node_tree_remove_layer_n(bNodeTree *ntree, Scene *scene, int layer_index)
bool node_is_parent_and_child(const bNode &parent, const bNode &child)
void node_attach_node(bNodeTree &ntree, bNode &node, bNode &parent)
void node_tree_blend_read_data(BlendDataReader *reader, ID *owner_id, bNodeTree *ntree)
static bool node_poll_default(const bNodeType *, const bNodeTree *, const char **)
const bNodeTreeInterfaceSocket * node_find_interface_input_by_identifier(const bNodeTree &ntree, StringRef identifier)
void node_register_alias(bNodeType &nt, StringRef alias)
void node_tree_free_local_tree(bNodeTree *ntree)
bool node_tree_is_registered(const bNodeTree &ntree)
static void node_init(const bContext *C, bNodeTree *ntree, bNode *node)
static void node_type_base_defaults(bNodeType &ntype)
static void direct_link_node_socket_default_value(BlendDataReader *reader, bNodeSocket *sock)
bNodeTreeType * node_tree_type_find(StringRef idname)
static void ntree_set_typeinfo(bNodeTree *ntree, bNodeTreeType *typeinfo)
void node_unlink_node(bNodeTree &ntree, bNode &node)
void node_tree_free_tree(bNodeTree &ntree)
Span< bNodeSocketType * > node_socket_types_get()
void node_tag_update_id(bNode &node)
static void socket_id_user_increment(bNodeSocket *sock)
bNodeTree * node_tree_add_tree_embedded(Main *bmain, ID *owner_id, StringRefNull name, StringRefNull idname)
std::optional< VolumeGridType > socket_type_to_grid_type(eNodeSocketDatatype type)
bNodeTree * node_tree_copy_tree(Main *bmain, const bNodeTree &ntree)
bNodeSocket * node_find_socket(bNode &node, eNodeSocketInOut in_out, StringRef identifier)
void node_remove_node(Main *bmain, bNodeTree &ntree, bNode &node, bool do_id_user, bool remove_animation=true)
bNode * node_add_node(const bContext *C, bNodeTree &ntree, StringRef idname)
bool node_socket_is_registered(const bNodeSocket &sock)
bool node_tree_iterator_step(NodeTreeIterStore *ntreeiter, bNodeTree **r_nodetree, ID **r_id)
static void update_socket_declarations(ListBase *sockets, Span< nodes::SocketDeclaration * > declarations)
void node_internal_links(bNode &node, bNodeLink **r_links, int *r_len)
static Set< int > get_known_node_types_set()
static void remove_unsupported_sockets(ListBase *sockets, ListBase *links)
bNode * node_get_active(bNodeTree &ntree)
static void defer_free_tree_type(bNodeTreeType *tree_type)
void node_tree_blend_write(BlendWriter *writer, bNodeTree *ntree)
static void node_foreach_path(ID *id, BPathForeachPathData *bpath_data)
bool node_link_is_selected(const bNodeLink &link)
static const CPPType * slow_socket_type_to_geo_nodes_base_cpp_type(const eNodeSocketDatatype type)
static void collect_used_previews(Map< bNodeInstanceKey, bNodePreview > &previews, bNodeTree *ntree, bNodeInstanceKey parent_key, Set< bNodeInstanceKey > &used)
void node_remove_socket(bNodeTree &ntree, bNode &node, bNodeSocket &sock)
void node_update_asset_metadata(bNodeTree &node_tree)
static bool is_node_socket_supported(const bNodeSocket *sock)
const DataTypeConversions & get_implicit_type_conversions()
static void defer_free_node_type(bNodeType *ntype)
static void ntree_copy_data(Main *, std::optional< Library * >, ID *id_dst, const ID *id_src, const int flag)
static auto & get_socket_type_map()
static void node_blend_write_storage(BlendWriter *writer, bNodeTree *ntree, bNode *node)
void node_unique_id(bNodeTree &ntree, bNode &node)
void node_type_size(bNodeType &ntype, int width, int minwidth, int maxwidth)
bNode * node_copy_with_mapping(bNodeTree *dst_tree, const bNode &node_src, int flag, bool use_unique, Map< const bNodeSocket *, bNodeSocket * > &new_socket_map)
bNode * node_copy(bNodeTree *dst_tree, const bNode &src_node, int flag, bool use_unique)
void node_register_type(bNodeType &ntype)
std::optional< StringRefNull > node_socket_short_label(const bNodeSocket &sock)
static void ntree_free_data(ID *id)
static void adjust_multi_input_indices_after_removed_link(bNodeTree *ntree, const bNodeSocket *sock, const int deleted_index)
static void ntree_blend_read_after_liblink(BlendLibReader *reader, ID *id)
void node_set_socket_availability(bNodeTree &ntree, bNodeSocket &sock, bool is_available)
void node_remove_link(bNodeTree *ntree, bNodeLink &link)
void node_chain_iterator_backwards(const bNodeTree *ntree, const bNode *node_start, bool(*callback)(bNode *, bNode *, void *), void *userdata, int recursion_lvl)
void node_chain_iterator(const bNodeTree *ntree, const bNode *node_start, bool(*callback)(bNode *, bNode *, void *, const bool), void *userdata, bool reversed)
static bool ntree_contains_tree_exec(const bNodeTree &tree_to_search_in, const bNodeTree &tree_to_search_for, Set< const bNodeTree * > &already_passed)
Span< bNodeType * > node_types_get()
static bool can_read_node_type(const bNode &node)
std::optional< StringRefNull > node_static_socket_interface_type_new(int type, int subtype, std::optional< int > dimensions=std::nullopt)
static void ntree_init_data(ID *id)
void node_tree_local_merge(Main *bmain, bNodeTree *localtree, bNodeTree *ntree)
void node_tree_set_type(bNodeTree &ntree)
bool node_declaration_ensure_on_outdated_node(bNodeTree &ntree, bNode &node)
static void direct_link_node_socket_storage(BlendDataReader *reader, const bNode *node, bNodeSocket *sock)
static void node_unlink_attached(bNodeTree *ntree, const bNode *parent)
static bNodeSocket * make_socket(bNodeTree *ntree, bNode *, const int in_out, ListBase *lb, const StringRefNull idname, const StringRefNull identifier, const StringRefNull name)
void node_tree_type_add(bNodeTreeType &nt)
void node_tree_update_all_new(Main &main)
void node_type_base(bNodeType &ntype, std::string idname, std::optional< int16_t > legacy_type=std::nullopt)
bNodePreview * node_preview_verify(Map< bNodeInstanceKey, bNodePreview > &previews, bNodeInstanceKey key, int xsize, int ysize, bool create)
void node_tree_iterator_init(NodeTreeIterStore *ntreeiter, Main *bmain)
static bNodeInstanceKey node_hash_int_str(bNodeInstanceKey hash, const char *str)
static int16_t get_next_auto_legacy_type()
std::optional< eNodeSocketDatatype > grid_type_to_socket_type(VolumeGridType type)
void node_node_foreach_id(bNode *node, LibraryForeachIDData *data)
bNodeTreeType NodeTreeTypeUndefined
static void node_set_typeinfo(const bContext *C, bNodeTree *ntree, bNode *node, bNodeType *typeinfo)
static void node_tree_asset_on_clear_asset(void *asset_ptr, AssetMetaData *asset_data)
bNodeTree ** node_tree_ptr_from_id(ID *id)
bNodeTree * node_tree_localize(bNodeTree *ntree, std::optional< ID * > new_owner_id)
void node_parents_iterator(bNode *node, bool(*callback)(bNode *, void *), void *userdata)
int node_count_socket_links(const bNodeTree &ntree, const bNodeSocket &sock)
void node_internal_relink(bNodeTree &ntree, bNode &node)
static void reset_socket_declarations(ListBase *sockets)
bNode * node_find_node_try(bNodeTree &ntree, bNodeSocket &socket)
static void direct_link_node_socket(BlendDataReader *reader, const bNode *node, bNodeSocket *sock)
const bNodeInstanceKey NODE_INSTANCE_KEY_BASE
std::optional< eNodeSocketDatatype > custom_data_type_to_socket_type(eCustomDataType type)
void node_free_node(bNodeTree *tree, bNode &node)
void node_preview_remove_unused(bNodeTree *ntree)
bool node_preview_used(const bNode &node)
bNodeType NodeTypeUndefined
static void node_foreach_id(ID *id, LibraryForeachIDData *data)
void node_tree_type_free_link(const bNodeTreeType &nt)
void node_type_socket_templates(bNodeType *ntype, bNodeSocketTemplate *inputs, bNodeSocketTemplate *outputs)
bNodeInstanceKey node_instance_key(bNodeInstanceKey parent_key, const bNodeTree *ntree, const bNode *node)
static void ntree_blend_read_data(BlendDataReader *reader, ID *id)
static void node_socket_copy(bNodeSocket *sock_dst, const bNodeSocket *sock_src, const int flag)
void node_register_socket_type(bNodeSocketType &stype)
void node_preview_merge_tree(bNodeTree *to_ntree, bNodeTree *from_ntree, bool remove_old)
static auto & get_node_tree_type_map()
static bool node_poll_instance_default(const bNode *node, const bNodeTree *ntree, const char **r_disabled_hint)
bNodeSocket * node_find_enabled_output_socket(bNode &node, StringRef name)
const CPPType * socket_type_to_geo_nodes_base_cpp_type(eNodeSocketDatatype type)
void node_position_relative(bNode &from_node, const bNode &to_node, const bNodeSocket *from_sock, const bNodeSocket &to_sock)
bool node_set_selected(bNode &node, bool select)
bNodeSocket * node_add_socket(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out, StringRefNull idname, StringRefNull identifier, StringRefNull name)
bNode & node_find_node(bNodeTree &ntree, bNodeSocket &socket)
static void node_tree_asset_pre_save(void *asset_ptr, AssetMetaData *)
static void iter_backwards_ex(const bNodeTree *ntree, const bNode *node_start, bool(*callback)(bNode *, bNode *, void *), void *userdata, const char recursion_mask)
static auto & get_node_type_alias_map()
bool node_tree_contains_tree(const bNodeTree &tree_to_search_in, const bNodeTree &tree_to_search_for)
void node_detach_node(bNodeTree &ntree, bNode &node)
void node_preview_init_tree(bNodeTree *ntree, int xsize, int ysize)
static void node_free_socket_type(void *socktype_v)
void node_rebuild_id_vector(bNodeTree &node_tree)
bNodeSocketType * node_socket_type_find(StringRef idname)
bNode * node_add_static_node(const bContext *C, bNodeTree &ntree, int type)
bNodeTree * node_tree_copy_tree_ex(const bNodeTree &ntree, Main *bmain, bool do_id_user)
bool node_supports_active_flag(const bNode &node, int sub_activity)
Does the given node supports the sub active flag.
bNodeLink & node_add_link(bNodeTree &ntree, bNode &fromnode, bNodeSocket &fromsock, bNode &tonode, bNodeSocket &tosock)
static void node_replace_undefined_types(bNode *node)
bNodeSocket * node_find_enabled_socket(bNode &node, eNodeSocketInOut in_out, StringRef name)
static void node_blend_read_data_storage(BlendDataReader *reader, bNodeTree *ntree, bNode *node)
bNodeTree * node_tree_add_tree(Main *bmain, StringRef name, StringRef idname)
bNodeSocketType * node_socket_type_find_static(int type, int subtype=0)
static void free_localized_node_groups(bNodeTree *ntree)
void node_link_set_mute(bNodeTree &ntree, bNodeLink &link, const bool muted)
StringRefNull node_socket_type_label(const bNodeSocketType &stype)
static bNodeTree * node_tree_add_tree_do(Main *bmain, std::optional< Library * > owner_library, ID *owner_id, const bool is_embedded, const StringRef name, const StringRef idname)
Span< bNodeTreeType * > node_tree_types_get()
bNodeSocket * node_add_static_socket(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out, int type, int subtype, StringRefNull identifier, StringRefNull name)
static void library_foreach_node_socket(bNodeSocket *sock, LibraryForeachIDData *data)
static void * socket_value_storage(bNodeSocket &socket)
void node_remove_socket_ex(bNodeTree &ntree, bNode &node, bNodeSocket &sock, bool do_id_user)
static void ntree_blend_write(BlendWriter *writer, ID *id, const void *id_address)
void node_unregister_type(bNodeType &ntype)
void node_modify_socket_type(bNodeTree &ntree, bNode &node, bNodeSocket &sock, StringRefNull idname)
static void * node_static_value_storage_for(bNode &node, const bNodeSocket &socket)
std::optional< StringRefNull > node_static_socket_label(int type, int subtype)
std::optional< StringRefNull > node_static_socket_type(int type, int subtype, std::optional< int > dimensions=std::nullopt)
static void node_add_sockets_from_type(bNodeTree *ntree, bNode *node, bNodeType *ntype)
void node_remove_socket_links(bNodeTree &ntree, bNodeSocket &sock)
const bNodeInstanceKey NODE_INSTANCE_KEY_NONE
bool node_declaration_ensure(bNodeTree &ntree, bNode &node)
void node_set_active(bNodeTree &ntree, bNode &node)
float2 node_dimensions_get(const bNode &node)
bNodeTree * node_tree_add_in_lib(Main *bmain, Library *owner_library, StringRefNull name, StringRefNull idname)
static void update_typeinfo(Main *bmain, bNodeTreeType *treetype, bNodeType *nodetype, bNodeSocketType *socktype, const bool unregister)
bNodeType * node_type_find(StringRef idname)
static void ntree_free_type(void *treetype_v)
static int node_count_links(const bNodeTree *ntree, const bNodeSocket *socket)
static void unique_socket_template_identifier(bNodeSocketTemplate *list, bNodeSocketTemplate *ntemp, const char defname[], const char delim)
static void write_node_socket_default_value(BlendWriter *writer, const bNodeSocket *sock)
static void node_foreach_cache(ID *id, IDTypeForeachCacheFunctionCallback function_callback, void *user_data)
static void node_tree_asset_on_mark_asset(void *asset_ptr, AssetMetaData *asset_data)
void node_socket_move_default_value(Main &bmain, bNodeTree &tree, bNodeSocket &src, bNodeSocket &dst)
bNodeTree * node_tree_from_id(ID *id)
void node_tree_update_all_users(Main *main, ID *id)
int node_socket_link_limit(const bNodeSocket &sock)
void node_clear_active(bNodeTree &ntree)
StringRefNull node_socket_sub_type_label(int subtype)
bNode * node_find_root_parent(bNode &node)
static void node_socket_free(bNodeSocket *sock, const bool do_id_user)
StringRefNull node_socket_label(const bNodeSocket &sock)
static void node_socket_set_typeinfo(bNodeTree *ntree, bNodeSocket *sock, bNodeSocketType *typeinfo)
void node_tree_free_embedded_tree(bNodeTree *ntree)
void node_type_storage(bNodeType &ntype, std::optional< StringRefNull > storagename, void(*freefunc)(bNode *node), void(*copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node))
static void write_node_socket(BlendWriter *writer, const bNodeSocket *sock)
std::optional< eCustomDataType > socket_type_to_custom_data_type(eNodeSocketDatatype type)
static void defer_free_socket_type(bNodeSocketType *stype)
void node_type_size_preset(bNodeType &ntype, eNodeSizePreset size)
void node_unique_name(bNodeTree &ntree, bNode &node)
bool node_is_static_socket_type(const bNodeSocketType &stype)
static auto & get_node_type_map()
bool node_link_is_hidden(const bNodeLink &link)
void node_type_base_custom(bNodeType &ntype, StringRefNull idname, StringRefNull name, StringRefNull enum_name, short nclass)
void node_tree_node_flag_set(bNodeTree &ntree, int flag, bool enable)
QuaternionBase< float > Quaternion
ImplicitSharingPtr< Bundle > BundlePtr
void update_node_declaration_and_sockets(bNodeTree &ntree, bNode &node)
void build_node_declaration(const bke::bNodeType &typeinfo, NodeDeclaration &r_declaration, const bNodeTree *ntree, const bNode *node)
ImplicitSharingPtr< Closure > ClosurePtr
MatBase< float, 4, 4 > float4x4
VecBase< float, 2 > float2
VectorSet< T, InlineBufferCapacity, DefaultProbingStrategy, CustomIDHash< T, GetIDFn >, CustomIDEqual< T, GetIDFn > > CustomIDVectorSet
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f
VecBase< float, 3 > float3
void uninitialized_copy_n(const T *src, int64_t n, T *dst)
static AssetTypeInfo AssetType_NT
void node_socket_init_default_value(bNodeSocket *sock)
bNodeSocket * node_add_socket_from_template(bNodeTree *ntree, bNode *node, bke::bNodeSocketTemplate *stemp, eNodeSocketInOut in_out)
void node_verify_sockets(bNodeTree *ntree, bNode *node, bool do_id_user)
void node_socket_copy_default_value_data(eNodeSocketDatatype datatype, void *to, const void *from)
static blender::bke::bNodeSocketTemplate outputs[]
static blender::bke::bNodeSocketTemplate inputs[]
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
StructRNA * RNA_struct_find(const char *identifier)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
const char * RNA_struct_ui_name(const StructRNA *type)
bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
const EnumPropertyItem rna_enum_property_subtype_items[]
struct bNodeTree * nodetree
unsigned int id_session_uid
struct AssetMetaData * asset_data
ImBufByteBuffer byte_buffer
struct bNodeTree * nodetree
struct bNodeTree * nodetree
NodeCryptomatte_Runtime runtime
struct bNodeTree * nodetree
struct bNodeTree * nodetree
struct bNodeTree * nodetree
struct Collection * value
bNodeSocketRuntimeHandle * runtime
bNodeSocketTypeHandle * typeinfo
char * default_attribute_name
struct IDProperty * properties
char * default_attribute_name
bNodeTreeRuntimeHandle * runtime
struct GeometryNodeAssetTraits * geometry_node_asset_traits
struct PreviewImage * preview
bNestedNodeRef * nested_node_refs
int default_group_node_width
bNodeTreeTypeHandle * typeinfo
bNodeTreeInterface tree_interface
bNodeTypeHandle * typeinfo
bNodePanelState * panel_states_array
bNodeRuntimeHandle * runtime
StringRef operator()(const T *value) const
FreestyleLineStyle * linestyle
Compact definition of a node socket.
void(* free_self)(bNodeSocketType *stype)
bool use_link_limits_of_type
const blender::CPPType * base_cpp_type
blender::nodes::NodeDeclaration * static_declaration
void(* copyfunc)(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)
NodeBlendWriteFunction blend_write_storage_content
std::string ui_description
NodeBlendDataReadFunction blend_data_read_storage_content
void(* freefunc)(bNode *node)
void(* initfunc)(bNodeTree *ntree, bNode *node)
bool(* poll_instance)(const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
bNodeSocketTemplate * inputs
bNodeSocketTemplate * outputs
const char * enum_name_legacy
bool(* poll)(const bNodeType *ntype, const bNodeTree *nodetree, const char **r_disabled_hint)
NodeDeclareFunction declare
void(* free_self)(bNodeType *ntype)
void(* initfunc_api)(const bContext *C, PointerRNA *ptr)