22#define DNA_DEPRECATED_ALLOW
89#include "RNA_prototypes.hh"
122using nodes::NodeDeclaration;
123using nodes::SocketDeclaration;
149 ntree->
runtime = MEM_new<bNodeTreeRuntime>(__func__);
155 std::optional<Library *> ,
166 ntree_dst->
runtime = MEM_new<bNodeTreeRuntime>(__func__);
172 ntree_dst->
nodes.clear_no_delete();
174 for (
const auto [i, src_node] : ntree_src->
nodes.enumerate()) {
177 ntree_dst, src_node, flag_subdata, src_node.name, src_node.identifier, socket_map);
186 ntree_dst->
links.clear_no_delete();
188 bNodeLink *dst_link = MEM_dupalloc(&src_link);
199 for (
bNode *
node : ntree_dst->all_nodes()) {
206 for (
bNode *
node : ntree_dst->all_nodes()) {
226 reference_set.socket = socket_map.
lookup(reference_set.socket);
229 socket = socket_map.
lookup(socket);
277 switch (ntree->
type) {
293 ntree->
links.free_no_destruct();
328 BKE_lib_query_idpropertiesForeachIDLink_callback(prop, data);
331 switch (sock->
type) {
410 BKE_lib_query_idpropertiesForeachIDLink_callback(prop, data);
415 BKE_lib_query_idpropertiesForeachIDLink_callback(prop, data);
456 switch (ntree->
type) {
475 ntree->ensure_topology_cache();
483 socket->default_value);
490 bpath_data, socket_value->
value,
sizeof(socket_value->
value));
504 ntree->ensure_topology_cache();
505 ntree->ensure_interface_cache();
517 if (socket->type ==
SOCK_RGBA && socket->default_value) {
522 else if (socket->type ==
SOCK_VECTOR && socket->default_value &&
523 (
STREQ(socket->name,
"Subsurface Radius") ||
524 STREQ(socket->name,
"Subsurface Radius Scale") ||
525 (
STREQ(
node->idname,
"ShaderNodeSubsurfaceScattering") &&
526 STREQ(socket->name,
"Radius")) ||
527 (
STREQ(
node->idname,
"ShaderNodeBsdfMetallic") &&
528 (
STR_ELEM(socket->name,
"IOR",
"Extinction")))))
539 if (socket->type ==
SOCK_RGBA && socket->default_value) {
548 fn.single(input_color_storage->
color);
558 if (typeinfo && typeinfo->
type ==
SOCK_RGBA && socket->socket_data) {
565 if (typeinfo && typeinfo->
type ==
SOCK_RGBA && socket->socket_data) {
581 if (debug_relationship_assert) {
594 node->locx_legacy =
node->location[0];
595 node->locy_legacy =
node->location[1];
596 if (
const bNode *parent =
node->parent) {
597 node->locx_legacy -= parent->location[0];
598 node->locy_legacy -= parent->location[1];
605 switch (ntree.
type) {
706 else if (
node->is_type(
"FunctionNodeMatchString"_ustr)) {
714 ->default_value_typed<bNodeSocketValueMenu>()
718 ->default_value_typed<bNodeSocketValueMenu>()
722 ->default_value_typed<bNodeSocketValueMenu>()
726 ->default_value_typed<bNodeSocketValueMenu>()
730 ->default_value_typed<bNodeSocketValueFont>()
733 else if (
node->is_type(
"GeometryNodeMergeLayers"_ustr)) {
738 else if (
node->is_type(
"GeometryNodeSetGreasePencilColor"_ustr)) {
742 else if (
node->is_type(
"GeometryNodeSetGreasePencilDepth"_ustr)) {
1037 node->custom2 = bool(
1042 node->custom1 = bool(
1079 output.storage =
nullptr;
1088 {
"NodeSocketFloatPixel",
"NodeSocketFloat"},
1089 {
"NodeSocketVectorPixel",
"NodeSocketVector"},
1090 {
"NodeSocketVectorPixel2D",
"NodeSocketVector2D"},
1091 {
"NodeSocketVectorPixel4D",
"NodeSocketVector4D"},
1092 {
"NodeSocketIntPixel",
"NodeSocketInt"},
1093 {
"NodeSocketIntVectorPixel2D",
"NodeSocketIntVector2D"},
1094 {
"NodeSocketIntVectorPixel3D",
"NodeSocketIntVector3D"}};
1098template<
typename ValueType>
1103 struct_writer.shallow_data.subtype =
PROP_NONE;
1129 sock_copy->
prop = prop_copy;
1136 switch (sock.
type) {
1156 MEM_delete(sock_copy);
1167 switch (sock->
type) {
1265 if (!
node->storage) {
1275 switch (ndg->
type) {
1294 if (item.identifier == 0) {
1297 storage.data_type_legacy = item.data_type;
1307 if (
ELEM(item.socket_type,
1373 for (
bNode *
node : ntree->all_nodes()) {
1379 node->custom1 =
data->parametrization;
1384 shallow_node.
runtime =
nullptr;
1394 if (
node->system_properties) {
1410 if (
node->storage) {
1443 for (
bNode *
node : ntree->all_nodes()) {
1446 for (
const auto &item : ids_to_restore.
items()) {
1447 *item.key = item.value;
1472 switch (sock->
type) {
1611template<
typename T,
typename T_404>
1613 void **dest_data,
void **raw_data,
FunctionRef<
void(
T &dest, T_404 &source)> copy_fn)
1617 T_404 *orig_data =
static_cast<T_404 *
>(*raw_data);
1618 *raw_data =
nullptr;
1619 T *final_data = MEM_new<T>(__func__);
1622 copy_fn(*final_data, *orig_data);
1623 *dest_data = final_data;
1624 MEM_delete(orig_data);
1649 switch (sock->
type) {
1728 switch (sock->
type) {
1736 dest.subtype = src.subtype;
1737 dest.value = src.value;
1750 dest.subtype = src.subtype;
1782 dest.subtype = src.subtype;
1783 dest.value = src.value;
1796 dest.subtype = src.subtype;
1797 STRNCPY(dest.value, src.value);
1816 dest.value = src.value;
1827 dest.value = src.value;
1847 dest.value = src.value;
1858 copy_v3_v3(dest.value_euler, src.value_euler);
1868 dest.value = src.value;
1894 switch (sock->
type) {
1924 switch (
node->type_legacy) {
1957 sock->
runtime = MEM_new<bNodeSocketRuntime>(__func__);
1962 ListBaseT<bNodeLink> *links)
1964 for (
bNodeSocket &sock : sockets->items_mutable()) {
1971 for (
bNodeLink &link : links->items_mutable()) {
1972 if (link.fromsock == &sock || link.tosock == &sock) {
1975 link.tosock->link =
nullptr;
1983 MEM_delete(sock.runtime);
1990 if (!
node->storage) {
2014 switch (
node->type_legacy) {
2045 iuser->
scene =
nullptr;
2058 iuser->
scene =
nullptr;
2075 map.
add(
"GeometryNodeEvaluateClosure",
"NodeEvaluateClosure");
2076 map.
add(
"GeometryNodeClosureInput",
"NodeClosureInput");
2077 map.
add(
"GeometryNodeClosureOutput",
"NodeClosureOutput");
2078 map.
add(
"GeometryNodeCombineBundle",
"NodeCombineBundle");
2079 map.
add(
"GeometryNodeSeparateBundle",
"NodeSeparateBundle");
2107 "Fixing root node tree '%s' owned by '%s' missing EMBEDDED tag, please consider "
2108 "re-saving your (startup) file",
2119 ntree->
runtime = MEM_new<bNodeTreeRuntime>(__func__);
2126 for (
const auto [i,
node] : ntree->
nodes.enumerate()) {
2128 node.runtime = MEM_new<bNodeRuntime>(__func__);
2129 node.typeinfo =
nullptr;
2130 node.runtime->index_in_tree = i;
2229 const bool is_context_dependent =
node.typeinfo->static_declaration &&
2230 node.typeinfo->static_declaration->is_context_dependent;
2231 const bool references_another_id =
node.id !=
nullptr;
2232 if (!(is_context_dependent && references_another_id)) {
2248 switch (base_typeinfo->
type) {
2254 if (create_default_value_properties) {
2267 if (value.dimensions != 3) {
2273 if (create_default_value_properties) {
2288 if (value.dimensions != 3) {
2294 if (create_default_value_properties) {
2308 if (create_default_value_properties) {
2321 if (create_default_value_properties) {
2334 if (create_default_value_properties) {
2351 if (create_default_value_properties) {
2364 if (create_default_value_properties) {
2371 if (value.enum_items) {
2372 if (create_default_value_properties) {
2373 if (std::ranges::any_of(
2374 value.enum_items->items,
2419 node_tree.ensure_interface_cache();
2432 std::string open_identifier = fmt::format(
"open_{}", panel.identifier);
2445 auto *prop =
idprop::create(socket->name(), socket->socket_type).release();
2459 return properties.release();
2472 auto property =
idprop::create(
"geometry_node_asset_traits_flag",
2483 auto property =
idprop::create(
"compositor_node_asset_traits_flag",
2528 .id_code = bNodeTree::id_type,
2535 .name_plural =
N_(
"node_groups"),
2543 .make_local =
nullptr,
2545 .foreach_cache =
nullptr,
2548 .foreach_asset_weak_reference =
nullptr,
2555 .blend_read_undo_preserve =
nullptr,
2557 .lib_override_apply_post =
nullptr,
2572 while (sockdef->
type != -1) {
2579 while (sockdef->
type != -1) {
2606 node->color[0] =
node->color[1] =
node->color[2] = 0.608;
2621 if (add_sockets_before_init) {
2634 if (!add_sockets_before_init) {
2672 node->typeinfo = typeinfo;
2715 const bool unregister)
2727 for (
bNode *
node : ntree->all_nodes()) {
2728 if (nodetype &&
node->idname == nodetype->
idname) {
2769 return value->idname;
2809 if (type->type == tree_type) {
3021 if (stype.
label[0] ==
'\0') {
3038 ListBaseT<bNodeSocket> *sockets = (in_out ==
SOCK_IN) ? &
node.inputs : &
node.outputs;
3040 if (sock.identifier_ustr() == identifier) {
3059 ListBaseT<bNodeSocket> *sockets = (in_out ==
SOCK_IN) ? &
node.inputs : &
node.outputs;
3061 if (socket.is_available() && socket.name == name) {
3081 ListBaseT<bNodeSocket> *lb,
3088 if (identifier[0] !=
'\0') {
3100 if (sock.identifier == check_name) {
3109 sizeof(auto_identifier));
3111 bNodeSocket *sock = MEM_new<bNodeSocket>(__func__);
3112 sock->runtime = MEM_new<bNodeSocketRuntime>(__func__);
3113 sock->in_out = in_out;
3116 sock->runtime->identifier_ustr =
UString(sock->identifier);
3117 sock->limit = (in_out ==
SOCK_IN ? 1 : 0xFFF);
3120 sock->storage =
nullptr;
3146 id = id_cast<ID *>(
static_cast<T *
>(
data)->value);
3154 if (
data ==
nullptr) {
3162 if (
data ==
nullptr) {
3172 data.subtype = subtype;
3179 data.subtype = subtype;
3193 static float default_value[] = {0.0f, 0.0f, 0.0f};
3194 data.subtype = subtype;
3195 data.dimensions = 3;
3202 data.subtype = subtype;
3203 data.dimensions = 3;
3210 static float default_value[] = {0.0f, 0.0f, 0.0f, 1.0f};
3215 data.subtype = subtype;
3216 data.value[0] =
'\0';
3220 data.value =
nullptr;
3224 data.value =
nullptr;
3228 data.value =
nullptr;
3232 data.value =
nullptr;
3236 data.value =
nullptr;
3240 data.value =
nullptr;
3244 data.value =
nullptr;
3248 data.value =
nullptr;
3252 data.value =
nullptr;
3256 data.value =
nullptr;
3261 data.enum_items =
nullptr;
3262 data.runtime_flag = 0;
3267 if (
data ==
nullptr) {
3278 T *
data = MEM_new<T>(__func__);
3287 if (src ==
nullptr) {
3291 constexpr const char *func = __func__;
3293 const T &src_value = *
static_cast<const T *
>(src);
3294 if constexpr (std::is_same_v<T, bNodeSocketValueMenu>) {
3295 T *dst = MEM_new<T>(func, src_value);
3297 if (dst->enum_items) {
3298 dst->enum_items->add_user();
3303 result = MEM_new<T>(func, src_value);
3315 const bool do_id_user)
3317 if (dst ==
nullptr || src ==
nullptr) {
3324 T &dst_value = *
static_cast<T *
>(dst);
3325 const T &src_value = *
static_cast<const T *
>(src);
3326 if constexpr (std::is_same_v<T, bNodeSocketValueMenu>) {
3328 if (dst_value.enum_items != src_items) {
3329 if (dst_value.enum_items) {
3330 dst_value.enum_items->remove_user_and_delete_if_last();
3336 dst_value = src_value;
3339 dst_value = src_value;
3349 if (
data ==
nullptr) {
3356 if constexpr (std::is_same_v<T, bNodeSocketValueMenu>) {
3358 if (value.enum_items) {
3360 value.enum_items->remove_user_and_delete_if_last();
3365 MEM_delete(
static_cast<T *
>(
data));
3401 switch (sock.
type) {
3453 if (!idname.has_value()) {
3454 CLOG_ERROR(&
LOG,
"static node socket type %d undefined", type);
3472 ListBaseT<bNodeSocket> *lb = (in_out ==
SOCK_IN ? &
node.inputs : &
node.outputs);
3494 const std::optional<int> dimensions)
3502 return "NodeSocketFloatUnsigned";
3504 return "NodeSocketFloatPercentage";
3506 return "NodeSocketFloatFactor";
3508 return "NodeSocketFloatMass";
3510 return "NodeSocketFloatAngle";
3512 return "NodeSocketFloatTime";
3514 return "NodeSocketFloatTimeAbsolute";
3516 return "NodeSocketFloatDistance";
3518 return "NodeSocketFloatWavelength";
3520 return "NodeSocketFloatColorTemperature";
3522 return "NodeSocketFloatFrequency";
3524 return "NodeSocketFloatPixel";
3527 return "NodeSocketFloat";
3532 return "NodeSocketIntUnsigned";
3534 return "NodeSocketIntPercentage";
3536 return "NodeSocketIntFactor";
3538 return "NodeSocketIntPixel";
3541 return "NodeSocketInt";
3544 return "NodeSocketBool";
3546 return "NodeSocketRotation";
3548 return "NodeSocketMatrix";
3550 if (!dimensions.has_value() || dimensions.value() == 3) {
3553 return "NodeSocketVectorFactor";
3555 return "NodeSocketVectorPercentage";
3557 return "NodeSocketVectorTranslation";
3559 return "NodeSocketVectorDirection";
3561 return "NodeSocketVectorVelocity";
3563 return "NodeSocketVectorAcceleration";
3565 return "NodeSocketVectorEuler";
3567 return "NodeSocketVectorXYZ";
3569 return "NodeSocketVectorPixel";
3572 return "NodeSocketVector";
3575 else if (dimensions.value() == 2) {
3578 return "NodeSocketVectorFactor2D";
3580 return "NodeSocketVectorPercentage2D";
3582 return "NodeSocketVectorTranslation2D";
3584 return "NodeSocketVectorDirection2D";
3586 return "NodeSocketVectorVelocity2D";
3588 return "NodeSocketVectorAcceleration2D";
3590 return "NodeSocketVectorEuler2D";
3592 return "NodeSocketVectorXYZ2D";
3594 return "NodeSocketVectorPixel2D";
3597 return "NodeSocketVector2D";
3600 else if (dimensions.value() == 4) {
3603 return "NodeSocketVectorFactor4D";
3605 return "NodeSocketVectorPercentage4D";
3607 return "NodeSocketVectorTranslation4D";
3609 return "NodeSocketVectorDirection4D";
3611 return "NodeSocketVectorVelocity4D";
3613 return "NodeSocketVectorAcceleration4D";
3615 return "NodeSocketVectorEuler4D";
3617 return "NodeSocketVectorXYZ4D";
3619 return "NodeSocketVectorPixel4D";
3622 return "NodeSocketVector4D";
3627 return "NodeSocketVector";
3630 if (!dimensions.has_value() || dimensions.value() == 3) {
3633 return "NodeSocketIntVectorUnsigned3D";
3635 return "NodeSocketIntVectorFactor3D";
3637 return "NodeSocketIntVectorPercentage3D";
3639 return "NodeSocketIntVectorPixel3D";
3642 return "NodeSocketIntVector3D";
3645 else if (dimensions.value() == 2) {
3648 return "NodeSocketIntVectorUnsigned2D";
3650 return "NodeSocketIntVectorFactor2D";
3652 return "NodeSocketIntVectorPercentage2D";
3654 return "NodeSocketIntVectorPixel2D";
3657 return "NodeSocketIntVector2D";
3662 return "NodeSocketIntVector3D";
3665 return "NodeSocketColor";
3669 return "NodeSocketStringFilePath";
3671 return "NodeSocketString";
3674 return "NodeSocketShader";
3676 return "NodeSocketObject";
3678 return "NodeSocketImage";
3680 return "NodeSocketGeometry";
3682 return "NodeSocketCollection";
3684 return "NodeSocketTexture";
3686 return "NodeSocketMaterial";
3688 return "NodeSocketFont";
3690 return "NodeSocketScene";
3692 return "NodeSocketText";
3694 return "NodeSocketMask";
3696 return "NodeSocketSound";
3698 return "NodeSocketMenu";
3700 return "NodeSocketBundle";
3702 return "NodeSocketClosure";
3706 return std::nullopt;
3710 const int type,
const int subtype,
const std::optional<int> dimensions)
3716 return "NodeTreeInterfaceSocketFloatUnsigned";
3718 return "NodeTreeInterfaceSocketFloatPercentage";
3720 return "NodeTreeInterfaceSocketFloatFactor";
3722 return "NodeTreeInterfaceSocketFloatMass";
3724 return "NodeTreeInterfaceSocketFloatAngle";
3726 return "NodeTreeInterfaceSocketFloatTime";
3728 return "NodeTreeInterfaceSocketFloatTimeAbsolute";
3730 return "NodeTreeInterfaceSocketFloatDistance";
3732 return "NodeTreeInterfaceSocketFloatWavelength";
3734 return "NodeTreeInterfaceSocketFloatColorTemperature";
3736 return "NodeTreeInterfaceSocketFloatFrequency";
3738 return "NodeTreeInterfaceSocketFloatPixel";
3741 return "NodeTreeInterfaceSocketFloat";
3746 return "NodeTreeInterfaceSocketIntUnsigned";
3748 return "NodeTreeInterfaceSocketIntPercentage";
3750 return "NodeTreeInterfaceSocketIntFactor";
3752 return "NodeTreeInterfaceSocketIntPixel";
3755 return "NodeTreeInterfaceSocketInt";
3758 return "NodeTreeInterfaceSocketBool";
3760 return "NodeTreeInterfaceSocketRotation";
3762 return "NodeTreeInterfaceSocketMatrix";
3764 if (!dimensions.has_value() || dimensions.value() == 3) {
3767 return "NodeTreeInterfaceSocketVectorFactor";
3769 return "NodeTreeInterfaceSocketVectorPercentage";
3771 return "NodeTreeInterfaceSocketVectorTranslation";
3773 return "NodeTreeInterfaceSocketVectorDirection";
3775 return "NodeTreeInterfaceSocketVectorVelocity";
3777 return "NodeTreeInterfaceSocketVectorAcceleration";
3779 return "NodeTreeInterfaceSocketVectorEuler";
3781 return "NodeTreeInterfaceSocketVectorXYZ";
3783 return "NodeTreeInterfaceSocketVectorPixel";
3786 return "NodeTreeInterfaceSocketVector";
3789 else if (dimensions.value() == 2) {
3792 return "NodeTreeInterfaceSocketVectorFactor2D";
3794 return "NodeTreeInterfaceSocketVectorPercentage2D";
3796 return "NodeTreeInterfaceSocketVectorTranslation2D";
3798 return "NodeTreeInterfaceSocketVectorDirection2D";
3800 return "NodeTreeInterfaceSocketVectorVelocity2D";
3802 return "NodeTreeInterfaceSocketVectorAcceleration2D";
3804 return "NodeTreeInterfaceSocketVectorEuler2D";
3806 return "NodeTreeInterfaceSocketVectorXYZ2D";
3808 return "NodeTreeInterfaceSocketVectorPixel2D";
3811 return "NodeTreeInterfaceSocketVector2D";
3814 else if (dimensions.value() == 4) {
3817 return "NodeTreeInterfaceSocketVectorFactor4D";
3819 return "NodeTreeInterfaceSocketVectorPercentage4D";
3821 return "NodeTreeInterfaceSocketVectorTranslation4D";
3823 return "NodeTreeInterfaceSocketVectorDirection4D";
3825 return "NodeTreeInterfaceSocketVectorVelocity4D";
3827 return "NodeTreeInterfaceSocketVectorAcceleration4D";
3829 return "NodeTreeInterfaceSocketVectorEuler4D";
3831 return "NodeTreeInterfaceSocketVectorXYZ4D";
3833 return "NodeTreeInterfaceSocketVectorPixel4D";
3836 return "NodeTreeInterfaceSocketVector4D";
3841 return "NodeTreeInterfaceSocketVector";
3844 if (!dimensions.has_value() || dimensions.value() == 3) {
3847 return "NodeTreeInterfaceSocketIntVectorUnsigned3D";
3849 return "NodeTreeInterfaceSocketIntVectorFactor3D";
3851 return "NodeTreeInterfaceSocketIntVectorPercentage3D";
3853 return "NodeTreeInterfaceSocketIntVectorPixel3D";
3856 return "NodeTreeInterfaceSocketIntVector3D";
3859 else if (dimensions.value() == 2) {
3862 return "NodeTreeInterfaceSocketIntVectorUnsigned2D";
3864 return "NodeTreeInterfaceSocketIntVectorFactor2D";
3866 return "NodeTreeInterfaceSocketIntVectorPercentage2D";
3868 return "NodeTreeInterfaceSocketIntVectorPixel2D";
3871 return "NodeTreeInterfaceSocketIntVector2D";
3876 return "NodeTreeInterfaceSocketIntVector3D";
3879 return "NodeTreeInterfaceSocketColor";
3883 return "NodeTreeInterfaceSocketStringFilePath";
3885 return "NodeTreeInterfaceSocketString";
3888 return "NodeTreeInterfaceSocketShader";
3890 return "NodeTreeInterfaceSocketObject";
3892 return "NodeTreeInterfaceSocketImage";
3894 return "NodeTreeInterfaceSocketGeometry";
3896 return "NodeTreeInterfaceSocketCollection";
3898 return "NodeTreeInterfaceSocketTexture";
3900 return "NodeTreeInterfaceSocketMaterial";
3902 return "NodeTreeInterfaceSocketFont";
3904 return "NodeTreeInterfaceSocketScene";
3906 return "NodeTreeInterfaceSocketText";
3908 return "NodeTreeInterfaceSocketMask";
3910 return "NodeTreeInterfaceSocketSound";
3912 return "NodeTreeInterfaceSocketMenu";
3914 return "NodeTreeInterfaceSocketBundle";
3916 return "NodeTreeInterfaceSocketClosure";
3920 return std::nullopt;
3951 return "Collection";
3973 return "Integer Vector";
3977 return std::nullopt;
3990 if (!idname.has_value()) {
3991 CLOG_ERROR(&
LOG,
"static node socket type %d undefined", type);
4023 if (link.fromsock == &sock || link.tosock == &sock) {
4028 for (
const int64_t i :
node.runtime->internal_links.index_range()) {
4030 if (link.
in == &sock || link.
out == &sock) {
4031 node.runtime->internal_links.remove_and_reorder(i);
4049 return reinterpret_cast<bNode *
>(
4055 ntree.ensure_topology_cache();
4056 return socket.owner_node();
4061 ntree.ensure_topology_cache();
4062 return socket.owner_node();
4068 const ListBaseT<bNodeSocket> *sockets = (socket.
in_out ==
SOCK_IN) ? &
node->inputs :
4071 if (&socket_iter == &socket) {
4082 ntree.ensure_interface_cache();
4084 if (input->identifier == identifier) {
4094 ntree.ensure_interface_cache();
4096 if (input->identifier == identifier) {
4106 while (parent_iter->
parent !=
nullptr) {
4107 parent_iter = parent_iter->
parent;
4109 if (!parent_iter->is_frame()) {
4117 for (
const bNode *child_iter = &child; child_iter; child_iter = child_iter->
parent) {
4118 if (child_iter == &parent) {
4126 const bNode *node_start,
4127 bool (*callback)(
bNode *,
bNode *,
void *,
const bool),
4129 const bool reversed)
4144 if (link.
tonode != node_start) {
4153 ntree, reversed ? link.
fromnode : link.
tonode, callback, userdata, reversed);
4161 const char recursion_mask)
4165 stack.
push(node_start);
4172 if (link ==
nullptr) {
4193 if (zone_type->output_type ==
node->type_legacy) {
4194 if (
bNode *zone_input_node =
const_cast<bNode *
>(
4195 zone_type->get_corresponding_input(*ntree, *
node)))
4197 if (callback(zone_input_node,
node, userdata)) {
4198 zone_stack.
push(zone_input_node);
4210 const int recursion_lvl)
4218 const char recursion_mask = (1 << recursion_lvl);
4222 node.runtime->iter_flag &= ~recursion_mask;
4231 if (!callback(
node->parent, userdata)) {
4254 node.identifier = new_id;
4263 std::optional<int> unique_identifier)
4266 node->runtime = MEM_new<bNodeRuntime>(__func__);
4268 if (unique_identifier) {
4269 node->identifier = *unique_identifier;
4275 node->ui_order = ntree.all_nodes().size();
4285 std::optional<UString> idname;
4290 if (ntype->type_legacy != type) {
4294 const char *disabled_hint;
4295 if (ntype->poll && ntype->poll(ntype, &ntree, &disabled_hint)) {
4296 idname = ntype->idname;
4309 sock_dst->
runtime = MEM_new<bNodeSocketRuntime>(__func__);
4311 if (sock_src->
prop) {
4328 const bNode &node_src,
4330 const std::optional<StringRefNull> dst_unique_name,
4331 const std::optional<int> dst_unique_identifier,
4333 const bool allow_duplicate_names)
4335 bNode *node_dst = MEM_new<bNode>(__func__, node_src);
4336 node_dst->
runtime = MEM_new<bNodeRuntime>(__func__);
4337 if (dst_unique_name) {
4341 else if (dst_tree) {
4342 if (!allow_duplicate_names) {
4346 if (dst_unique_identifier) {
4347 node_dst->
identifier = *dst_unique_identifier;
4352 else if (dst_tree) {
4361 node_dst->
inputs.clear_no_delete();
4363 bNodeSocket *dst_socket = MEM_dupalloc(&src_socket);
4366 socket_map.
add_new(&src_socket, dst_socket);
4369 node_dst->
outputs.clear_no_delete();
4371 bNodeSocket *dst_socket = MEM_dupalloc(&src_socket);
4374 socket_map.
add_new(&src_socket, dst_socket);
4377 if (node_src.
prop) {
4389 dst_link.
in = socket_map.
lookup(dst_link.
in);
4409 reinterpret_cast<ID *
>(dst_tree), RNA_Node, node_dst);
4425 if (!socket.is_output()) {
4429 switch (
node.type_legacy) {
4431 reinterpret_cast<NodeInputBool *
>(
node.storage)->
boolean = *
static_cast<const bool *
>(value);
4436 *
static_cast<const float *
>(value);
4439 reinterpret_cast<NodeInputInt *
>(
node.storage)->integer = *
static_cast<const int *
>(value);
4443 *
static_cast<const float3 *
>(value));
4460 node.id = *
static_cast<ID *
const *
>(value);
4465 if (
node.is_type(
"ShaderNodeCombineXYZ"_ustr)) {
4466 const float3 &vector = *
static_cast<const float3 *
>(value);
4472 if (
node.is_type(
"GeometryNodeInputFont"_ustr)) {
4473 node.id = *
static_cast<ID *
const *
>(value);
4476 if (
node.is_type(
"FunctionNodeInputMenu"_ustr)) {
4477 reinterpret_cast<NodeInputMenu *
>(
node.storage)->value = *
static_cast<const int *
>(value);
4480 if (
node.is_type(
"ShaderNodeRGB"_ustr) ||
node.is_type(
"CompositorNodeRGB"_ustr)) {
4485 if (
node.is_type(
"ShaderNodeValue"_ustr)) {
4487 *
static_cast<const float *
>(value);
4496 switch (socket.
type) {
4539 tree.ensure_topology_cache();
4541 bNode &dst_node = dst.owner_node();
4542 bNode &src_node = src.owner_node();
4546 if (src.is_multi_input()) {
4550 if (dst_node.is_reroute() || src_node.is_reroute()) {
4561 if (&src_type != &dst_type) {
4562 if (!
convert.is_convertible(src_type, dst_type)) {
4569 dst_node.is_type(
"FunctionNodeInputString"_ustr))
4573 MEM_SAFE_DELETE(dst_storage->string);
4584 convert.convert_to_uninitialized(src_type, dst_type, src_value, dst_buffer);
4641 BLI_assert(ntree.all_nodes().contains(&fromnode));
4642 BLI_assert(ntree.all_nodes().contains(&tonode));
4647 link = MEM_new<bNodeLink>(__func__);
4658 link = MEM_new<bNodeLink>(__func__);
4662 link->
tonode = &fromnode;
4663 link->
tosock = &fromsock;
4669 if (link->
tosock->is_multi_input()) {
4695 const bool was_muted = link.is_muted();
4697 if (muted != was_muted) {
4705 if (link.fromsock == &sock || link.tosock == &sock) {
4713 return !(link.
fromsock->is_visible() && link.
tosock->is_visible());
4722 if (
node->is_selected()) {
4725 if (!
node->is_reroute()) {
4728 if (!visited_nodes.
add(
node)) {
4731 if (
node->input_sockets().is_empty()) {
4735 for (
const bNodeLink *prev_link : input_socket.directly_linked_links()) {
4749 if (
node->is_selected()) {
4752 if (!
node->is_reroute()) {
4755 if (!visited_nodes.
add(
node)) {
4758 if (
node->output_sockets().is_empty()) {
4762 for (
const bNodeLink *next_link : output_socket.directly_linked_links()) {
4772 if (link.
fromnode->is_selected() || link.
tonode->is_selected()) {
4775 if (!link.
fromnode->is_reroute() && !link.
tonode->is_reroute()) {
4787 if (link.
tonode->is_reroute()) {
4800 const int deleted_index)
4819 if (link.fromnode != &
node) {
4825 if (internal_link.
out == link.fromsock) {
4826 internal_input = internal_link.
in;
4830 bNodeLink *fromlink = internal_input ? internal_input->
link :
nullptr;
4832 if (fromlink ==
nullptr) {
4833 if (link.tosock->is_multi_input()) {
4835 &ntree, link.tosock, link.multi_input_sort_id);
4841 if (link.tosock->is_multi_input()) {
4844 if (link_to_compare.fromsock == fromlink->
fromsock &&
4845 link_to_compare.tosock == link.tosock)
4848 &ntree, link_to_compare.tosock, link_to_compare.multi_input_sort_id);
4855 link.fromsock = fromlink->
fromsock;
4871 for (
bNodeLink *link : duplicate_links_to_remove) {
4877 if (link.tonode == &
node) {
4887 node.parent = &parent;
4895 node.parent =
nullptr;
4901 const bNode &to_node,
4911 tot_sock_idx = to_node.
outputs.count();
4921 float offset_y =
U.widget_unit * tot_sock_idx;
4926 tot_sock_idx = from_node.
outputs.count();
4936 offset_y -=
U.widget_unit * tot_sock_idx;
4945 if (socket.
link !=
nullptr) {
4954 std::optional<Library *> owner_library,
4956 const bool is_embedded,
4964 if (is_embedded || bmain ==
nullptr) {
4968 "Embedded NTrees should never have a defined owner library here");
4978 *ntree_owner_ptr = ntree;
5018 BKE_id_copy_ex(bmain,
reinterpret_cast<const ID *
>(&ntree),
nullptr, flag));
5029 ListBaseT<bNodeSocket> *lb =
nullptr;
5030 if (link.fromnode == &
node) {
5033 else if (link.tonode == &
node) {
5039 if (link.tonode != &
node && link.tosock->is_multi_input()) {
5041 &ntree, link.tosock, link.multi_input_sort_id);
5044 if (link.fromsock == &sock || link.tosock == &sock) {
5055 for (
bNode *
node : ntree->all_nodes()) {
5056 if (
node->parent == parent) {
5067 for (
const auto [i,
node] : node_tree.
nodes.enumerate()) {
5069 node.runtime->index_in_tree = i;
5099 if (
node.typeinfo &&
node.typeinfo->freefunc) {
5114 MEM_SAFE_DELETE(
node.panel_states_array);
5120 if (
node.system_properties) {
5125 if (
node.runtime->declaration) {
5128 if (!
node.typeinfo ||
node.runtime->declaration !=
node.typeinfo->static_declaration) {
5129 delete node.runtime->declaration;
5133 MEM_delete(
node.runtime);
5164 if (
node.typeinfo->freefunc_api) {
5167 node.typeinfo->freefunc_api(&ptr);
5183 if (remove_animation) {
5191 if (bmain !=
nullptr) {
5217 if (
node.is_group() && ngroup !=
nullptr) {
5246 if (
node.is_type(
"CompositorNodeOutputFile"_ustr)) {
5249 const bool node_is_output =
node.is_type(
"CompositorNodeViewer"_ustr) ||
5250 node.is_type(
"GeometryNodeViewer"_ustr);
5261 const bool tnode_is_output = tnode.is_type(
"CompositorNodeViewer"_ustr) ||
5262 tnode.is_type(
"GeometryNodeViewer"_ustr);
5263 const bool viewer_case = (is_compositor || is_geometry) && tnode_is_output &&
5265 const bool has_same_shortcut = viewer_case && &
node != &tnode &&
5277 if (has_same_shortcut) {
5283 if (
output == 0 && !is_geometry) {
5289 if (
node.is_group_output()) {
5292 if (!tnode.is_group_output()) {
5318 switch (
id->id_type()) {
5320 return &
reinterpret_cast<Material *
>(
id)->nodetree;
5322 return &
reinterpret_cast<Light *
>(
id)->nodetree;
5324 return &
reinterpret_cast<World *
>(
id)->nodetree;
5326 return &
reinterpret_cast<Tex *
>(
id)->nodetree;
5329 return &
reinterpret_cast<Scene *
>(
id)->nodetree;
5340 return (nodetree !=
nullptr) ? *nodetree :
nullptr;
5350 node->flag &= ~flag;
5357 if (ntree ==
nullptr) {
5375 if (
node.is_group() && group !=
nullptr) {
5385 while (node_src !=
nullptr) {
5387 node_src = node_src->
next;
5388 node_local = node_local->
next;
5402 if (&tree_to_search_in == &tree_to_search_for) {
5406 tree_to_search_in.ensure_topology_cache();
5407 for (
const bNode *node_group : tree_to_search_in.group_nodes()) {
5408 const bNodeTree *sub_tree_search_in =
reinterpret_cast<const bNodeTree *
>(node_group->id);
5409 if (!sub_tree_search_in) {
5412 if (!already_passed.
add(sub_tree_search_in)) {
5426 if (&tree_to_search_in == &tree_to_search_for) {
5457 bool changed =
false;
5493 for (
bNode *tnode : ntree.all_nodes()) {
5494 tnode->flag &= ~flags_to_set;
5496 node.flag |= flags_to_set;
5501 if (is_available == sock.is_available()) {
5515 if (sock.is_multi_input()) {
5533 for (
const auto [
index, socket] : (sockets)->enumerate()) {
5535 socket.runtime->declaration = &socket_decl;
5542 socket.runtime->declaration =
nullptr;
5549 if (
node->runtime->declaration->skip_updating_sockets) {
5560 if (
node.runtime->declaration !=
nullptr) {
5563 if (
node.typeinfo->declare) {
5564 if (
node.typeinfo->static_declaration) {
5565 if (!
node.typeinfo->static_declaration->is_context_dependent) {
5566 node.runtime->declaration =
node.typeinfo->static_declaration;
5571 if (
node.typeinfo->declare) {
5589 return float2(
node.runtime->draw_bounds.xmax,
node.runtime->draw_bounds.ymax) -
5590 float2(
node.runtime->draw_bounds.xmin,
node.runtime->draw_bounds.ymin);
5611 while ((c = *
str++)) {
5639 result.add(ntype->type_legacy);
5652 if (
node.storage ==
nullptr) {
5654 if (!node_type || !node_type->
storagename.empty()) {
5672 const std::string old_idname =
node.idname;
5687 for (
bNode *
node : ntree->all_nodes()) {
5709 if (
id ==
nullptr) {
5713 bool need_update =
false;
5717 for (
bNode *
node : ntree->all_nodes()) {
5718 if (
node->id ==
id) {
5734 if (
node.label[0] !=
'\0') {
5738 if (
node.typeinfo->labelfunc) {
5741 return label_buffer;
5752 return short_label.
ref();
5755 return std::nullopt;
5777 const std::optional<std::string> &translation_context =
5781 if (!translation_context.has_value()) {
5785 return translation_context->c_str();
5790 const int nclass =
node.typeinfo->ui_class ==
nullptr ?
node.typeinfo->nclass :
5848 const char **r_disabled_hint)
5850 return node->typeinfo->poll(
node->typeinfo, ntree, r_disabled_hint);
5855 static std::atomic<int> next_legacy_type = []() {
5861 const int new_type = next_legacy_type.fetch_add(1);
5862 BLI_assert(new_type <= std::numeric_limits<int16_t>::max());
5870 if (!legacy_type.has_value()) {
5931 return std::nullopt;
5959 return std::nullopt;
6010 if (type.
is<
float>()) {
6013 if (type.
is<
int>()) {
6022 if (type.
is<
bool>()) {
6034 if (type.
is<std::string>()) {
6049 if (type.
is<
Tex *>()) {
6077 return std::nullopt;
6092 return std::nullopt;
6108 return std::nullopt;
6114 const char defname[],
6120 if (ntemp_iter != ntemp) {
6121 if (ntemp_iter->identifier == check_name) {
6145 ntemp->identifier[0] =
'\0';
6149 STRNCPY(ntemp->identifier, ntemp->name);
6156 ntemp->identifier[0] =
'\0';
6160 STRNCPY(ntemp->identifier, ntemp->name);
6167 const std::optional<StringRefNull> storagename,
6171 const bNode *src_node))
6189 if (nt->rna_ext.free) {
6190 nt->rna_ext.free(nt->rna_ext.data);
6197 if (st->ext_socket.free) {
6198 st->ext_socket.free(st->ext_socket.data);
6200 if (st->ext_interface.free) {
6201 st->ext_interface.free(st->ext_interface.data);
6208 if (nt->rna_ext.free) {
6209 nt->rna_ext.free(nt->rna_ext.data);
6232 *r_nodetree = &node_tree;
6233 *r_id = &node_tree.
id;
6237 if (ntreeiter->
scene) {
6241 *r_id = &ntreeiter->
scene->
id;
6245 if (ntreeiter->
mat) {
6246 *r_nodetree =
reinterpret_cast<bNodeTree *
>(ntreeiter->
mat->nodetree);
6247 *r_id = &ntreeiter->
mat->id;
6248 ntreeiter->
mat =
reinterpret_cast<Material *
>(ntreeiter->
mat->id.next);
6251 if (ntreeiter->
tex) {
6253 *r_id = &ntreeiter->
tex->
id;
6257 if (ntreeiter->
light) {
6258 *r_nodetree =
reinterpret_cast<bNodeTree *
>(ntreeiter->
light->nodetree);
6259 *r_id = &ntreeiter->
light->id;
6260 ntreeiter->
light =
reinterpret_cast<Light *
>(ntreeiter->
light->id.next);
6263 if (ntreeiter->
world) {
6264 *r_nodetree =
reinterpret_cast<bNodeTree *
>(ntreeiter->
world->nodetree);
6265 *r_id = &ntreeiter->
world->id;
6266 ntreeiter->
world =
reinterpret_cast<World *
>(ntreeiter->
world->id.next);
6283 for (
bNode *
node : ntree->all_nodes()) {
6285 if (
node->custom1 == layer_index) {
6288 else if (
node->custom1 > layer_index) {
6300 if (stype && ttype->valid_socket_type) {
6301 return ttype->valid_socket_type(ttype, stype);
#define IDP_BlendDataRead(reader, prop)
#define BKE_LIB_FOREACHID_PROCESS_FUNCTION_CALL(data_, func_call_)
#define BKE_LIB_FOREACHID_PROCESS_IDSUPER(data_, id_super_, cb_flag_)
#define BKE_LIB_FOREACHID_PROCESS_ID(data_, id_, cb_flag_)
#define NODE_CLASS_OUTPUT
#define NODE_CLASS_INTERFACE
#define NODE_CUSTOM_GROUP
#define NODE_CLASS_CONVERTER
#define NODE_LEGACY_TYPE_GENERATION_START
#define NODE_CLASS_PATTERN
#define NODE_CLASS_GEOMETRY
#define NODE_CLASS_DISTORT
#define FOREACH_NODETREE_END
#define NODE_CLASS_OP_VECTOR
#define NODE_CLASS_LAYOUT
#define FOREACH_NODETREE_BEGIN(bmain, _nodetree, _id)
#define NODE_CLASS_OP_COLOR
#define NODE_CLASS_OP_FILTER
#define NODE_CLASS_ATTRIBUTE
#define NODE_CLASS_TEXTURE
#define NODE_CLASS_SHADER
#define NODE_CLASS_SCRIPT
#define GEO_NODE_MERGE_BY_DISTANCE
#define GEO_NODE_TRIANGULATE
#define CMP_NODE_PREMULKEY
#define GEO_NODE_SUBDIVISION_SURFACE
#define GEO_NODE_INPUT_OBJECT
#define SH_NODE_CURVE_FLOAT
#define CMP_NODE_COLOR_SPILL
#define CMP_NODE_CORNERPIN
#define GEO_NODE_MESH_TO_VOLUME
#define CMP_NODE_MASK_ELLIPSE
#define CMP_NODE_DISPLACE
#define SH_NODE_TEX_IMAGE
#define CMP_NODE_CRYPTOMATTE
#define CMP_NODE_TRANSLATE
#define GEO_NODE_UV_PACK_ISLANDS
#define CMP_NODE_MOVIEDISTORTION
#define CMP_NODE_COLORBALANCE
#define GEO_NODE_REMOVE_ATTRIBUTE
#define GEO_NODE_UV_UNWRAP
#define FN_NODE_INPUT_COLOR
#define CMP_NODE_KUWAHARA
#define FN_NODE_INPUT_VECTOR
#define SH_NODE_TEX_ENVIRONMENT
#define SH_NODE_NORMAL_MAP
#define SH_NODE_CURVE_VEC
#define CMP_NODE_HUECORRECT
#define GEO_NODE_TRANSFORM_GEOMETRY
#define FN_NODE_INPUT_STRING
#define CMP_NODE_TRANSFORM
#define CMP_NODE_DILATEERODE
#define GEO_NODE_INPUT_COLLECTION
#define CMP_NODE_LENSDIST
#define GEO_NODE_SAMPLE_GRID
#define FN_NODE_INPUT_INT
#define GEO_NODE_FILLET_CURVE
#define FN_NODE_INPUT_BOOL
#define CMP_NODE_CRYPTOMATTE_LEGACY
#define CMP_NODE_TRACKPOS
#define CMP_NODE_OUTPUT_FILE
#define CMP_NODE_SETALPHA
#define SH_NODE_BSDF_HAIR_PRINCIPLED
#define CMP_NODE_CURVE_RGB
#define CMP_NODE_DOUBLEEDGEMASK
#define GEO_NODE_RESAMPLE_CURVE
#define CMP_NODE_STABILIZE2D
#define SH_NODE_VECTOR_DISPLACEMENT
#define GEO_NODE_SCALE_ELEMENTS
#define SH_NODE_CURVE_RGB
#define GEO_NODE_CAPTURE_ATTRIBUTE
#define CMP_NODE_MASK_BOX
#define GEO_NODE_FILL_CURVE
#define TEX_NODE_CURVE_TIME
#define GEO_NODE_STRING_TO_CURVES
#define GEO_NODE_POINTS_TO_VOLUME
#define CMP_NODE_R_LAYERS
#define GEO_NODE_INPUT_MATERIAL
#define GEO_NODE_DISTRIBUTE_POINTS_IN_VOLUME
#define CMP_NODE_DIST_MATTE
#define CMP_NODE_VIEW_LEVELS
#define CMP_NODE_CURVE_VEC_DEPRECATED
#define FN_NODE_INPUT_ROTATION
#define TEX_NODE_VALTORGB
#define GEO_NODE_VOLUME_TO_MESH
#define GEO_NODE_SET_CURVE_NORMAL
#define TEX_NODE_CURVE_RGB
#define CMP_NODE_CHANNEL_MATTE
#define BUFFER_FOR_CPP_TYPE_VALUE(type, variable_name)
#define SNPRINTF_UTF8(dst, format,...)
#define STRNCPY_UTF8(dst, src)
Platform independent time functions.
#define BLO_read_raw_address(reader, ptr_p)
#define BLO_read_struct_list(reader, struct_name, list)
#define BLO_read_struct(reader, struct_name, ptr_p)
#define BLT_I18NCONTEXT_ID_NODETREE
#define CLOG_ERROR(clg_ref,...)
#define CLOG_WARN(clg_ref,...)
Object groups, one object can be in many groups at once.
#define RE_PASSNAME_COMBINED
Read Blender memory allocation and freeing.
#define BLI_assert_unreachable()
#define SET_FLAG_FROM_TEST(value, test, flag)
#define BLI_assert_msg(a, msg)
static const CPPType & get()
void destruct(void *ptr) const
constexpr int64_t last(const int64_t n=0) const
bool add(const Key &key, const Value &value)
const Value & lookup(const Key &key) const
const Value * lookup_ptr_as(const ForwardKey &key) const
void add_new(const Key &key, const Value &value)
ItemIterator items() const &
static RandomNumberGenerator from_random_seed()
void add_destruct_call(Func func)
bool contains(const Key &key) const
void push(const T &value)
constexpr const char * c_str() const
constexpr StringRefNull()
const char * c_str() const
StringRefNull ref() const
const Key & lookup_key_as(const ForwardKey &key) const
bool contains_as(const ForwardKey &key) const
void reserve(const int64_t n)
int64_t index_of(const Key &key) const
IndexRange index_range() const
bool contains(const Key &key) const
Span< Key > as_span() const
void add_new(const Key &key)
void append_non_duplicates(const T &value)
Vector< bNodeInternalLink > internal_links
const nodes::SocketDeclaration * declaration
std::unique_ptr< node_tree_reference_lifetimes::ReferenceLifetimesInfo > reference_lifetimes_info
std::shared_ptr< nodes::GeneratedTreeSrnaData > compositor_effect_nodes_srna_data
std::shared_ptr< nodes::GeneratedTreeSrnaData > scene_compositor_effect_srna_data
std::unique_ptr< nodes::EvalDependencies > eval_dependencies
std::unique_ptr< nodes::StructureTypeInterface > structure_type_interface
std::shared_ptr< nodes::GeneratedTreeSrnaData > geometry_nodes_srna_data
NodeIDVectorSet nodes_by_id
std::shared_ptr< nodes::GeneratedTreeSrnaData > compositor_nodes_srna_data
void copy_utf8_truncated(char *dst, int64_t dst_size) const
std::unique_ptr< CustomSocketLabelFn > label_fn
std::optional< std::string > translation_context
#define storage(slot, qualifiers)
float length(VecOp< float, D >) RET
static void free_legacy_socket_storage(bNode &node)
static void initialize_legacy_socket_storage(bNode &node)
static void write_default_value_none_subtype(BlendWriter *writer, const void *default_value)
static void update_node_location_legacy(bNodeTree &ntree)
static void write_legacy_properties(bNodeTree &ntree, Map< ID **, ID * > &r_ids_to_restore)
static void pixel_subtype_forward_compat(BlendWriter *writer, const bNodeSocket &sock)
static const Map< StringRef, StringRef > & subtype_pixel_to_none()
std::unique_ptr< IDProperty, IDPropertyDeleter > create_bool(StringRef prop_name, bool value, eIDPropertyFlag flags={})
Allocate a new IDProperty of type IDP_BOOLEAN, set its name and value.
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_socket_data_as(bNodeTreeInterfaceSocket &item)
@ ClosureInputReferenceSet
bool topology_cache_is_available(const bNodeTree &tree)
constexpr int MIN_BLENDFILE_VERSION_FOR_MODERN_NODE_SOCKET_DEFAULT_VALUE_READING
static void direct_link_node_socket_legacy_data_version_do(void **dest_data, void **raw_data, FunctionRef< void(T &dest, T_404 &source)> copy_fn)
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)
void node_chain_iterator_backwards(const bNodeTree *ntree, bNode *node_start, bool(*callback)(bNode *, bNode *, void *), void *userdata, int recursion_lvl)
NodeColorTag node_color_tag(const bNode &node)
void * socket_value_copy(eNodeSocketDatatype type, const void *src, bool do_id_user)
static void node_free_type(void *nodetype_v)
void node_socket_declarations_update(bNode *node)
void node_tree_free_local_node(bNodeTree &ntree, bNode &node)
void node_tree_set_output(bNodeTree &ntree)
static ID ** node_owner_pointer_get(ID *id, const bool debug_relationship_assert)
const bNodeZoneType * zone_type_by_node_type(const int node_type)
void node_modify_socket_type_static(bNodeTree *ntree, bNode *node, bNodeSocket *sock, int type, int subtype)
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)
static bNodeSocket * make_socket(bNodeTree *ntree, bNode *, const eNodeSocketInOut in_out, ListBaseT< bNodeSocket > *lb, const StringRefNull idname, const StringRefNull identifier, const StringRefNull name)
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_node_flag_set(bNodeTree &ntree, eNode_Flag flag, bool enable)
void node_tree_blend_read_data(BlendDataReader *reader, ID *owner_id, bNodeTree *ntree)
static void node_foreach_working_space_color(ID *id, const IDTypeForeachColorFunctionCallback &fn)
static bool node_poll_default(const bNodeType *, const bNodeTree *, const char **)
const bNodeTreeInterfaceSocket * node_find_interface_input_by_identifier(const bNodeTree &ntree, StringRef identifier)
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_value_init_impl(T &, const int)
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)
void node_remove_node(Main *bmain, bNodeTree &ntree, bNode &node, bool do_id_user, bool remove_animation=true)
bool node_socket_is_registered(const bNodeSocket &sock)
bool node_tree_iterator_step(NodeTreeIterStore *ntreeiter, bNodeTree **r_nodetree, ID **r_id)
static Set< int > get_known_node_types_set()
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)
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 remove_unsupported_sockets(ListBaseT< bNodeSocket > *sockets, ListBaseT< bNodeLink > *links)
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_register_type(bNodeType &ntype)
void * socket_value_new(eNodeSocketDatatype type, int subtype=0)
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)
const char * node_socket_translation_context(const bNodeSocket &sock)
void node_remove_link(bNodeTree *ntree, bNodeLink &link)
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)
IDProperty * node_create_asset_meta_data_properties(const bNodeTree &node_tree)
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_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)
void socket_value_init(eNodeSocketDatatype type, void *data, int subtype=0)
bNode * node_add_node(const bContext *C, bNodeTree &ntree, UString idname, std::optional< int > unique_identifier=std::nullopt)
void node_tree_type_add(bNodeTreeType &nt)
void node_tree_update_all_new(Main &main)
void node_tree_iterator_init(NodeTreeIterStore *ntreeiter, Main *bmain)
static bNodeInstanceKey node_hash_int_str(bNodeInstanceKey hash, const char *str)
bNodeType * node_type_find(UString idname)
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)
void node_unlink_attached(bNodeTree *ntree, const bNode *parent)
void node_type_base(bNodeType &ntype, UString idname, std::optional< int16_t > legacy_type=std::nullopt)
int node_count_socket_links(const bNodeTree &ntree, const bNodeSocket &sock)
void node_internal_relink(bNodeTree &ntree, bNode &node)
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)
bNodeType NodeTypeUndefined
static void node_foreach_id(ID *id, LibraryForeachIDData *data)
static void node_socket_free_default_value(bNodeSocket *sock, const bool do_id_user)
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 bool get_socket_value(bNodeSocket &socket, void *buffer)
static void node_socket_copy(bNodeSocket *sock_dst, const bNodeSocket *sock_src, const int flag)
static void node_update_idname_from_experimental(bNode &node)
void node_register_socket_type(bNodeSocketType &stype)
static ID * socket_value_get_id_ptr(const eNodeSocketDatatype type, void *data)
static bool check_link_selected_backward(const bNodeLink &link, Set< const bNode * > &visited_nodes)
static auto & get_node_tree_type_map()
static void reset_socket_declarations(ListBaseT< bNodeSocket > *sockets)
static bool node_poll_instance_default(const bNode *node, const bNodeTree *ntree, const char **r_disabled_hint)
void node_set_undefined_type(bNode &node)
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 auto & get_node_type_alias_map()
bool node_tree_contains_tree(const bNodeTree &tree_to_search_in, const bNodeTree &tree_to_search_for)
void socket_value_free(eNodeSocketDatatype type, void *data, bool do_id_user)
void node_detach_node(bNodeTree &ntree, bNode &node)
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)
static bool store_socket_value(bNode &node, const bNodeSocket &socket, const void *value)
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)
bNodeSocket * node_find_enabled_socket(bNode &node, eNodeSocketInOut in_out, StringRef name)
UString node_type_find_alias(UString alias)
static std::unique_ptr< IDProperty, idprop::IDPropertyDeleter > create_socket_meta_data_properties(const bNodeTreeInterfaceSocket &socket, const bool create_default_value_properties)
static void node_blend_read_data_storage(BlendDataReader *reader, bNodeTree *ntree, bNode *node)
bNodeTree * node_tree_add_tree(Main *bmain, StringRef name, StringRef idname)
bool socket_data_to_static_type(const eNodeSocketDatatype type, Fn &&fn)
static void update_socket_declarations(ListBaseT< bNodeSocket > *sockets, const Span< SocketDeclaration * > declarations)
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)
void socket_value_copy_content(eNodeSocketDatatype type, void *dst, const void *src, bool do_id_user)
static void library_foreach_node_socket(bNodeSocket *sock, LibraryForeachIDData *data)
bNodeSocket * node_find_socket(bNode &node, eNodeSocketInOut in_out, UString identifier)
void node_remove_socket_ex(bNodeTree &ntree, bNode &node, bNodeSocket &sock, bool do_id_user)
static void iter_backwards_ex(const bNodeTree *ntree, bNode *node_start, bool(*callback)(bNode *, bNode *, void *), void *userdata, const char recursion_mask)
void node_register_alias(bNodeType &nt, UString alias)
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)
bNode * node_copy_with_mapping(bNodeTree *dst_tree, const bNode &node_src, int flag, std::optional< StringRefNull > dst_unique_name, std::optional< int > dst_unique_identifier, Map< const bNodeSocket *, bNodeSocket * > &new_socket_map, bool allow_duplicate_names=false)
std::optional< StringRefNull > node_static_socket_label(int type, int subtype)
const bNodeTreeInterfaceSocket * node_find_interface_output_by_identifier(const bNodeTree &ntree, StringRef identifier)
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)
static void ntree_free_type(void *treetype_v)
void socket_value_id_user_decrement(eNodeSocketDatatype type, void *data)
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_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)
bNodeTreeType * node_tree_type_find_builtin(const int tree_type)
static bool check_link_selected_forward(const bNodeLink &link, Set< const bNode * > &visited_nodes)
StringRefNull node_socket_sub_type_label(int subtype)
void socket_value_id_user_increment(eNodeSocketDatatype type, void *data)
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_unique_name(bNodeTree &ntree, bNode &node)
bool node_is_static_socket_type(const bNodeSocketType &stype)
static auto & get_node_type_map()
bool node_tree_type_supports_socket_type_static(const int ntree_type, const eNodeSocketDatatype socket_type)
bool node_link_is_hidden(const bNodeLink &link)
void node_type_base_custom(bNodeType &ntype, StringRefNull idname, StringRefNull name, StringRefNull enum_name, short nclass)
QuaternionBase< float > Quaternion
QuaternionBase< T > normalize_and_get_length(const QuaternionBase< T > &q, T &out_length)
EulerXYZBase< float > EulerXYZ
Euler3Base< T > to_euler(const AxisAngleBase< T, AngleT > &axis_angle, EulerOrder order)
void update_node_declaration_and_sockets(bNodeTree &ntree, bNode &node, Main *bmain)
void build_node_declaration(const bke::bNodeType &typeinfo, NodeDeclaration &r_declaration, const bNodeTree *ntree, const bNode *node)
ImplicitSharingPtr< Closure > ClosurePtr
ImplicitSharingPtr< Bundle > BundlePtr
GeometryNodeUVUnwrapMethod
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
void RNA_def_struct_ui_text(StructRNA *srna, const char *name, const char *description)
void BKE_ntree_update_tag_node_removed(bNodeTree *ntree)
GeometryNodeRaycastMapMode
@ NODE_ACTIVE_PAINT_CANVAS
void IDP_FreeProperty_ex(IDProperty *prop, bool do_id_user)
void BKE_previewimg_id_free(ID *id)
char * STRNCPY(char(&dst)[N], const char *src)
constexpr bool is_same_any_v
void BKE_ntree_update(Main &bmain, std::optional< Span< bNodeTree * > > modified_trees=std::nullopt, const NodeTreeUpdateExtraParams ¶ms={})
void BKE_asset_metadata_idprop_ensure(AssetMetaData *asset_data, IDProperty *prop)
void BKE_ntree_update_tag_link_added(bNodeTree *ntree, bNodeLink *link)
void * BKE_libblock_alloc_in_lib(Main *bmain, std::optional< Library * > owner_library, short type, const char *name, int flag) ATTR_WARN_UNUSED_RESULT
bool RNA_struct_is_a(const StructRNA *type, const StructRNA *srna)
MINLINE void copy_v3_v3(float r[3], const float a[3])
void BKE_ntree_update_tag_link_changed(bNodeTree *ntree)
void BKE_previewimg_blend_read(BlendDataReader *reader, PreviewImage *prv)
void * BLO_read_struct_by_name_array(BlendDataReader *reader, StringRef struct_name, int64_t items_num, const void *old_address)
void BKE_ntree_update_tag_socket_new(bNodeTree *ntree, bNodeSocket *socket)
bool IDP_AddToGroup(IDProperty *group, IDProperty *prop) ATTR_NONNULL()
void BKE_previewimg_blend_write(BlendWriter *writer, const PreviewImage *prv)
GeometryNodeStringToCurvesAlignYMode
void IDP_BlendWrite(BlendWriter *writer, const IDProperty *prop)
const EnumPropertyItem rna_enum_property_subtype_items[]
void IDP_foreach_property(IDProperty *id_property_root, int type_filter, FunctionRef< void(IDProperty *id_property)> callback)
void * BLI_findstring(const ListBase *listbase, const char *id, int offset) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BKE_curvemapping_curves_blend_write(BlendWriter *writer, const CurveMapping *cumap)
GeometryNodeCurveFillMode
const char * RNA_struct_ui_name(const StructRNA *type)
MatBase< float, 4, 4 > float4x4
void BKE_ntree_update_tag_link_removed(bNodeTree *ntree)
void BKE_ntree_update_tag_parent_change(bNodeTree *ntree, bNode *node)
StructRNA * RNA_struct_find(const char *identifier)
void BKE_id_blend_write(BlendWriter *writer, ID *id)
@ NODE_INTERFACE_PANEL_DEFAULT_CLOSED
bool BKE_animdata_fix_paths_remove(ID *id, const char *prefix)
@ LIB_ID_CREATE_NO_USER_REFCOUNT
@ LIB_ID_COPY_NO_ANIMDATA
void BKE_colorband_foreach_working_space_color(ColorBand *coba, const IDTypeForeachColorFunctionCallback &fn)
void BKE_libblock_free_data(ID *id, bool do_id_user) ATTR_NONNULL()
VecBase< float, 4 > float4
size_t void BLI_uniquename_cb(FunctionRef< bool(StringRefNull)> unique_check, const char *defname, char delim, char *name, size_t name_maxncpy) ATTR_NONNULL(2
void BLI_uniquename(const ListBase *list, void *vlink, const char *defname, char delim, int name_offset, size_t name_maxncpy) ATTR_NONNULL(1
int BLI_findindex(const ListBase *listbase, const void *vlink) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
void BKE_curvemapping_blend_read(BlendDataReader *reader, CurveMapping *cumap)
@ CMP_NODE_GLARE_SIMPLE_STAR
VecBase< float, 2 > float2
GeometryNodeCurveFilletMode
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
CMPNodeChannelMatteColorSpace
@ CMP_NODE_CHANNEL_MATTE_CS_HSV
@ CMP_NODE_CHANNEL_MATTE_CS_YUV
@ CMP_NODE_CHANNEL_MATTE_CS_RGB
@ CMP_NODE_CHANNEL_MATTE_CS_YCC
BMesh const char void * data
void BKE_animdata_free(ID *id, bool do_id_user)
bool RNA_enum_name(const EnumPropertyItem *item, const int value, const char **r_name)
@ VOLUME_GRID_VECTOR_FLOAT
VectorSet< T, InlineBufferCapacity, DefaultProbingStrategy, CustomIDHash< T, GetIDFn >, CustomIDEqual< T, GetIDFn > > CustomIDVectorSet
void BKE_ntree_update_tag_socket_removed(bNodeTree *ntree)
char char size_t BLI_str_escape(char *__restrict dst, StringRef src, size_t dst_maxncpy) ATTR_NONNULL(1)
void BKE_ntree_update_tag_node_type(bNodeTree *ntree, bNode *node)
void ntreeTexEndExecTree(struct bNodeTreeExec *exec)
void BKE_ntree_update_tag_socket_type(bNodeTree *ntree, bNodeSocket *socket)
void BKE_image_format_blend_read_data(BlendDataReader *reader, ImageFormatData *imf)
void BKE_libblock_init_empty(ID *id) ATTR_NONNULL(1)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
void BKE_ntree_update_tag_all(bNodeTree *ntree)
GeometryNodeMergeByDistanceMode
void BLO_read_array_and_validate_size(BlendDataReader *reader, T **ptr_p, SizeT *array_size, const int elems=1)
void BKE_previewimg_id_copy(ID *new_id, const ID *old_id)
GeometryNodeStringToCurvesAlignXMode
void BKE_libblock_free_runtime_data(ID *id)
void RNA_struct_blender_type_set(StructRNA *srna, void *blender_type)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BKE_ntree_update_tag_node_property(bNodeTree *ntree, bNode *node)
bool BKE_bpath_foreach_path_fixed_process(BPathForeachPathData *bpath_data, char *path, size_t path_maxncpy)
bNodeSocket * node_add_socket_from_template(bNodeTree *ntree, bNode *node, bke::bNodeSocketTemplate *stemp, eNodeSocketInOut in_out)
void IDP_FreeProperty(IDProperty *prop)
@ NODE_VIEWER_SHORTCUT_NONE
int BLO_read_fileversion_get(BlendDataReader *reader)
void BKE_ntree_update_tag_missing_runtime_data(bNodeTree *ntree)
static AssetTypeInfo AssetType_NT
bool BLO_read_lib_is_undo(BlendLibReader *reader)
void DEG_relations_tag_update(Main *bmain)
char * BLI_strdup_null(const char *str) ATTR_WARN_UNUSED_RESULT ATTR_MALLOC
void ntreeShaderEndExecTree(struct bNodeTreeExec *exec)
ColorSceneLinear4f< eAlpha::Premultiplied > ColorGeometry4f
void BKE_ntree_update_tag_socket_availability(bNodeTree *ntree, bNodeSocket *socket)
MINLINE void copy_v4_v4(float r[4], const float a[4])
ID * BKE_id_copy_ex(Main *bmain, const ID *id, ID **new_id_p, int flag)
@ IDWALK_CB_READFILE_IGNORE
VecBase< float, 3 > float3
IDProperty * IDP_CopyProperty_ex(const IDProperty *prop, int flag) ATTR_WARN_UNUSED_RESULT ATTR_NONNULL()
GeometryNodeCurveResampleMode
void node_verify_sockets(Main *bmain, bNodeTree *ntree, bNode *node, bool do_id_user)
GeometryNodePointsToVolumeResolutionMode
GeometryNodeStringToCurvesOverflowMode
MINLINE void zero_v3_int(int r[3])
GeometryNodeStringToCurvesPivotMode
void BKE_ntree_update_tag_link_mute(bNodeTree *ntree, bNodeLink *link)
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 BLO_read_string(BlendDataReader *reader, char **ptr_p)
size_t(*) MEM_allocN_len(const void *vmemh) ATTR_WARN_UNUSED_RESULT
void BKE_ntree_update_tag_node_internal_link(bNodeTree *ntree, bNode *node)
void uninitialized_copy_n(const T *src, int64_t n, T *dst)
void BKE_ntree_update_tag_node_new(bNodeTree *ntree, bNode *node)
void BKE_libblock_free_data_py(ID *id)
@ IDTYPE_FLAGS_APPEND_IS_REUSABLE
void write_string(const char *data)
void write_struct_by_name(const char *struct_name, const void *data, BlendStructWriterFn fn=nullptr)
void write_struct_at_address(const void *address, const T *data, BlendStructWriterTypedFn< T > fn=nullptr)
void write_id_struct(const void *id_address, const T *id, BlendStructWriterTypedFn< T > fn=nullptr)
void write_struct_cast(const void *data, BlendStructWriterTypedFn< T > fn=nullptr)
void write_struct(const T *data, BlendStructWriterTypedFn< T > fn=nullptr)
void write_struct_array(const int64_t array_size, const T *data, BlendStructWriterTypedFn< T > fn=nullptr)
struct bNodeTree * nodetree
struct AssetMetaData * asset_data
ListBaseT< bNodeTree > nodetrees
ListBaseT< FreestyleLineStyle > linestyles
ListBaseT< Light > lights
ListBaseT< World > worlds
ListBaseT< Material > materials
ListBaseT< Scene > scenes
ListBaseT< Tex > textures
ListBaseT< CryptomatteLayer > layers
ListBaseT< CryptomatteEntry > entries
NodeCryptomatte_Runtime runtime
DNA_DEPRECATED char star_45
DNA_DEPRECATED char angle
DNA_DEPRECATED char streaks
DNA_DEPRECATED ImageFormatData format
DNA_DEPRECATED struct bNodeTree * nodetree
struct bNodeTree * nodetree
struct Collection * value
bke::bNodeSocketType * typeinfo
bke::bNodeSocketRuntime * runtime
char * default_attribute_name
char * default_attribute_name
struct CompositorNodeAssetTraits * compositor_node_asset_traits
ListBaseT< bNodeLink > links
DNA_DEPRECATED ListBaseT< bNodeSocket > outputs_legacy
int default_group_node_width
bke::bNodeTreeType * typeinfo
uint32_t next_node_identifier_seed
struct GeometryNodeAssetTraits * geometry_node_asset_traits
bNodeTreeInterface tree_interface
struct PreviewImage * preview
DNA_DEPRECATED ListBaseT< bNodeSocket > inputs_legacy
bke::bNodeTreeRuntime * runtime
bNestedNodeRef * nested_node_refs
ListBaseT< bNodeSocket > outputs
bke::bNodeRuntime * runtime
bNodePanelState * panel_states_array
ListBaseT< bNodeSocket > inputs
bke::bNodeType * typeinfo
IDProperty * system_properties
UString operator()(const T *value) const
FreestyleLineStyle * linestyle
static constexpr int Default
Compact definition of a node socket.
const CPPType * base_cpp_type
SocketGetCPPValueFunction get_base_cpp_value
void(*) free_self(bNodeSocketType *stype)
bool use_link_limits_of_type
void(*) localize(bNodeTree *localtree, bNodeTree *ntree)
NodeBlendWriteFunction blend_write_storage_content
std::string ui_description
NodeBlendDataReadFunction blend_data_read_storage_content
void(*) initfunc_api(const bContext *C, PointerRNA *ptr)
bool(*) poll(const bNodeType *ntype, const bNodeTree *nodetree, const char **r_disabled_hint)
void(*) freefunc(bNode *node)
bNodeSocketTemplate * inputs
void(*) copyfunc(bNodeTree *dest_ntree, bNode *dest_node, const bNode *src_node)
bNodeSocketTemplate * outputs
void(*) initfunc(bNodeTree *ntree, bNode *node)
const char * enum_name_legacy
void(*) copyfunc_api(PointerRNA *ptr, const bNode *src_node)
NodeDeclareFunction declare
nodes::NodeDeclaration * static_declaration
void(*) free_self(bNodeType *ntype)
bool(*) poll_instance(const bNode *node, const bNodeTree *nodetree, const char **r_disabled_hint)
Vector< const bNodeSocket * > potential_data_origins