52#include "RNA_prototypes.hh"
143 if (node && node->
idname == node_idname) {
158 if (output_node_id == 0) {
161 output_node_id = identifier_map.
lookup_default(output_node_id, 0);
162 if (output_node_id == 0) {
186 if (gnode && !exit) {
206 ot->name =
"Edit Group";
207 ot->description =
"Edit node group";
208 ot->idname =
"NODE_OT_group_edit";
243 if (!node || node->is_frame()) {
247 if (!node->is_group()) {
250 if (node->is_custom_group()) {
263 ot->name =
"Enter/Exit Group";
264 ot->description =
"Enter or exit node group based on cursor location";
265 ot->idname =
"NODE_OT_group_enter_exit";
287 sizeof(*basepath_change),
AT);
290 return basepath_change;
311 const bNestedNodeRef *child_ref = ngroup.find_nested_node_ref(ref.path.id_in_node);
315 constexpr int32_t missing_id = -1;
318 if (new_node_id == missing_id) {
321 ref.path.node_id = new_node_id;
331 ListBase anim_basepaths = {
nullptr,
nullptr};
350 if (node->is_group_input() || node->is_group_output()) {
352 nodes_delayed_free.
append(node);
357 std::optional<std::string> old_animation_basepath;
366 const int32_t old_identifier = node->identifier;
369 node_identifier_map.
add(old_identifier, node->identifier);
380 node->location[0] += gnode->
location[0];
381 node->location[1] += gnode->
location[1];
385 wgroup->
runtime->nodes_by_id.clear();
405 BLI_assert_msg(assign_ok,
"assigning a copy of an already-assigned Action should work");
419 BLI_assert_msg(unassign_ok,
"unassigning an Action that was just assigned should work");
433 if (glinks_first !=
nullptr) {
435 if (link->fromnode->is_group_input()) {
436 const char *identifier = link->fromsock->identifier;
437 int num_external_links = 0;
443 if (tlink->tonode == gnode &&
STREQ(tlink->tosock->identifier, identifier)) {
445 *ntree, *tlink->fromnode, *tlink->fromsock, *link->tonode, *link->tosock);
446 num_external_links++;
452 if (num_external_links == 0) {
459 ntree, link->tosock->new_sock, link->tonode->new_node, ntree, sock, gnode);
472 if (link->fromnode == gnode) {
473 const char *identifier = link->fromsock->identifier;
474 int num_internal_links = 0;
481 if (tlink->tonode->is_group_output() && (tlink->tonode->flag &
NODE_DO_OUTPUT)) {
482 if (
STREQ(tlink->tosock->identifier, identifier)) {
484 *ntree, *tlink->fromnode, *tlink->fromsock, *link->tonode, *link->tosock);
485 num_internal_links++;
492 if (num_internal_links == 0) {
498 nodeSocketCopy(ntree, link->tosock, link->tonode, ntree, sock, gnode);
505 for (
bNode *node : nodes_delayed_free) {
526 if (node->idname == node_idname) {
527 if (node->id !=
nullptr) {
528 nodes_to_ungroup.
append(node);
536 for (
bNode *node : nodes_to_ungroup) {
546 ot->name =
"Ungroup";
547 ot->description =
"Ungroup selected nodes";
548 ot->idname =
"NODE_OT_group_ungroup";
572 ListBase anim_basepaths = {
nullptr,
nullptr};
581 [](
const bNode *node) {
return node->is_group_input() || node->is_group_output(); });
583 for (
bNode *node : nodes_to_move) {
597 node_identifier_map.
add(old_identifier, newnode->
identifier);
599 node_map.
add_new(node, newnode);
624 const bool fromselect = (link->fromnode && nodes_to_move.
contains(link->fromnode));
625 const bool toselect = (link->tonode && nodes_to_move.
contains(link->tonode));
629 if (fromselect && toselect) {
631 *node_map.
lookup(link->fromnode),
632 *socket_map.
lookup(link->fromsock),
633 *node_map.
lookup(link->tonode),
634 *socket_map.
lookup(link->tosock));
639 if (fromselect && toselect) {
643 else if (fromselect || toselect) {
682 {
NODE_GS_COPY,
"COPY", 0,
"Copy",
"Copy to parent node tree, keep group intact"},
683 {
NODE_GS_MOVE,
"MOVE", 0,
"Move",
"Move to parent node tree, remove from group"},
684 {0,
nullptr, 0,
nullptr,
nullptr},
740 op_ptr = layout->
op(
"NODE_OT_group_separate",
IFACE_(
"Move"), ICON_NONE);
751 ot->name =
"Separate";
752 ot->description =
"Separate selected nodes from the node group";
753 ot->idname =
"NODE_OT_group_separate";
776 [](
bNode *node) {
return node->is_group_input() || node->is_group_output(); });
777 nodes_to_group.
remove(group_node);
778 return nodes_to_group;
797 for (
bNode *node : nodes_to_group) {
798 const char *disabled_hint =
nullptr;
799 if (node->typeinfo->poll_instance &&
800 !node->typeinfo->poll_instance(node, ngroup, &disabled_hint))
805 "Cannot add node '%s' in a group:\n %s",
818 ntree.ensure_topology_cache();
819 for (
bNode *node : ntree.all_nodes()) {
820 if (nodes_to_group.
contains(node)) {
825 for (
const bNodeSocket *other_socket : socket->directly_linked_sockets()) {
826 if (nodes_to_group.
contains(
const_cast<bNode *
>(&other_socket->owner_node()))) {
833 if (sockets_connected_to_group(node->input_sockets()) &&
834 sockets_connected_to_group(node->output_sockets()))
842 for (
bNode *input_node : ntree.nodes_by_type(zone_type->input_idname)) {
843 if (
bNode *output_node = zone_type->get_corresponding_output(ntree, *input_node)) {
844 const bool input_selected = nodes_to_group.
contains(input_node);
845 const bool output_selected = nodes_to_group.
contains(output_node);
846 if (input_selected && !output_selected) {
849 "Cannot add zone input node '%s' to a group without its paired output '%s'",
854 if (output_selected && !input_selected) {
857 "Cannot add zone output node '%s' to a group without its paired input '%s'",
874 if (
nodes.is_empty()) {
882 float2 loc(node->location);
885 loc.x += node->width;
886 loc.y -= node->height;
901 if (node_tree.has_available_link_cycle()) {
904 const bNode &node = socket.owner_node();
905 if (!node.is_reroute()) {
909 node.input_socket(0);
910 if (!other_socket.is_logically_linked()) {
913 return *other_socket.logically_linked_sockets().first();
922 return node.is_group() || node.is_group_input() || node.is_group_output();
931 const bNode &node_for_io = socket_for_io.owner_node();
936 tree_for_interface, node_for_io, socket_for_io, socket_for_io.
idname, socket_for_name.
name);
950 new_nested_node_refs.
append(ref);
954 used_nested_node_ref_ids.
add(ref.id);
959 if (new_node_id == -1) {
968 if (used_nested_node_ref_ids.
add(new_id)) {
973 new_id_by_old_path.
add_new(ref.path, new_ref.
id);
974 new_nested_node_refs.
append(new_ref);
978 ref.path.id_in_node = new_ref.
id;
1003 float2 real_min, real_max;
1007 const bool expose_visible = nodes_to_move.
size() == 1;
1010 group.ensure_topology_cache();
1011 bNode *output_node = [&]() {
1012 if (
bNode *node = group.group_output_node()) {
1016 output_node->
location[0] = real_max[0] - center[0] + 50.0f;
1022 input_node->
location[0] = real_min[0] - center[0] - 200.0f;
1024 struct InputSocketInfo {
1032 struct OutputLinkInfo {
1037 struct NewInternalLinkInfo {
1052 ntree.ensure_topology_cache();
1054 for (
bNode *node : nodes_to_move) {
1055 for (
bNodeSocket *output_socket : node->output_sockets()) {
1056 if (!output_socket->is_visible()) {
1057 for (
bNodeLink *link : output_socket->directly_linked_links()) {
1058 links_to_remove.
add(link);
1063 for (
bNodeLink *link : output_socket->directly_linked_links()) {
1065 links_to_remove.
add(link);
1068 if (link->tonode == gnode) {
1069 links_to_remove.
add(link);
1072 if (nodes_to_move.
contains(link->tonode)) {
1073 internal_links_to_move.
add(link);
1077 ntree, group, *link->fromsock);
1079 output_links.
append({link, io_socket});
1082 links_to_remove.
add(link);
1085 if (expose_visible && !output_socket->is_directly_linked()) {
1087 group, *node, *output_socket);
1089 new_internal_links.
append({node, output_socket, io_socket});
1095 for (
bNode *node : nodes_to_move) {
1096 for (
bNodeSocket *input_socket : node->input_sockets()) {
1097 if (!input_socket->is_visible()) {
1098 for (
bNodeLink *link : input_socket->directly_linked_links()) {
1099 links_to_remove.
add(link);
1104 for (
bNodeLink *link : input_socket->directly_linked_links()) {
1106 links_to_remove.
add(link);
1109 if (link->fromnode == gnode) {
1110 links_to_remove.
add(link);
1113 if (nodes_to_move.
contains(link->fromnode)) {
1114 internal_links_to_move.
add(link);
1118 info.from_node = link->fromnode;
1119 info.links.append(link);
1120 if (!info.interface_socket) {
1124 if (expose_visible && !input_socket->is_directly_linked()) {
1126 group, *node, *input_socket);
1128 new_internal_links.
append({node, input_socket, io_socket});
1135 for (
bNode *node : ntree.all_nodes()) {
1136 if (node->parent && nodes_to_move.
contains(node->parent) && !nodes_to_move.
contains(node)) {
1140 for (
bNode *node : nodes_to_move) {
1141 if (node->parent && !nodes_to_move.
contains(node->parent)) {
1148 ListBase anim_basepaths = {
nullptr,
nullptr};
1149 for (
bNode *node : nodes_to_move) {
1163 for (
bNode *node : nodes_to_move) {
1164 const int32_t old_identifier = node->identifier;
1171 node_identifier_map.
add(old_identifier, node->identifier);
1183 for (
bNode *node : nodes_to_move) {
1184 node->location[0] -= center[0];
1185 node->location[1] -= center[1];
1188 for (
bNodeLink *link : internal_links_to_move) {
1195 for (
bNodeLink *link : links_to_remove) {
1200 for (
const auto item : input_links.
items()) {
1201 const StringRefNull interface_identifier = item.value.interface_socket->identifier;
1204 for (
bNodeLink *link : item.value.links) {
1216 for (
const OutputLinkInfo &info : output_links) {
1218 const StringRefNull io_identifier = info.interface_socket->identifier;
1221 group, *info.link->fromnode, *info.link->fromsock, *output_node, *output_sock);
1225 for (
const NewInternalLinkInfo &info : new_internal_links) {
1226 const StringRefNull io_identifier = info.interface_socket->identifier;
1227 if (info.socket->in_out ==
SOCK_IN) {
1250 for (
const auto item : input_links.
items()) {
1251 const StringRefNull interface_identifier = item.value.interface_socket->identifier;
1253 bke::node_add_link(ntree, *item.value.from_node, *item.key, *gnode, *group_node_socket);
1257 for (
const OutputLinkInfo &info : output_links) {
1259 info.link->fromnode = gnode;
1286 gnode->
id = (
ID *)ngroup;
1307 return &new_node.input_socket(*index);
1315 return &new_node.output_socket(*index);
1323 const bNode &src_node,
1331 const bNodeSocket &socket = src_node.socket_by_decl(*socket_decl);
1332 if (!socket.is_available()) {
1336 group, src_node, socket);
1341 if (socket.is_input()) {
1354 if (panel_decl->default_collapsed) {
1358 panel_decl->name, panel_decl->description,
flag, parent);
1362 group, src_node, *child_item_decl, io_panel, r_mapping);
1369 const bNode &src_node,
1381 *dst_group, src_node, *item_decl,
nullptr, r_mapping);
1390 dst_group, src_node, 0, std::nullopt, std::nullopt, inner_node_socket_mapping);
1398 inner_node.
parent =
nullptr;
1408 for (
bNodeSocket *socket : inner_node.input_sockets()) {
1411 for (
bNodeSocket *socket : inner_node.output_sockets()) {
1458 gnode->
id = &wrapper_group->
id;
1466 ntree.ensure_topology_cache();
1469 for (
const bNodeSocket *src_socket : src_node.input_sockets()) {
1474 for (
const bNodeSocket *src_socket : src_node.output_sockets()) {
1485 src_panel_state.identifier))
1488 if (new_panel_state.identifier == *new_identifier) {
1499 if (link->tonode == &src_node) {
1501 link->tonode = gnode;
1502 link->tosock = new_to_socket;
1508 if (link->fromnode == &src_node) {
1510 link->fromnode = gnode;
1511 link->fromsock = new_from_socket;
1521 std::string old_node_name = src_node.
name;
1546 bNode *gnode =
nullptr;
1547 if (nodes_to_group.
size() == 1 && nodes_to_group[0]->declaration()) {
1574 ot->name =
"Make Group";
1575 ot->description =
"Make group from selected nodes";
1576 ot->idname =
"NODE_OT_group_make";
1602 if (!gnode || !gnode->
id) {
1610 for (
const bNode *group : nodes_to_group) {
1611 if (!group->is_group() || group->id ==
nullptr) {
1636 ot->name =
"Group Insert";
1637 ot->description =
"Insert selected nodes into a node group";
1638 ot->idname =
"NODE_OT_group_insert";
1682 if (!parent_path_item) {
1686 if (!parent_ntree) {
1689 parent_ntree->ensure_topology_cache();
1702 ot->name =
"Set Default Group Node Width";
1703 ot->description =
"Set the width based on the parent group node in the current context";
1704 ot->idname =
"NODE_OT_default_group_width_set";
Functions and classes to work with Actions.
Blender kernel action and pose functionality.
void BKE_animdata_transfer_by_basepath(struct Main *bmain, struct ID *srcID, struct ID *dstID, struct ListBase *basepaths)
SpaceNode * CTX_wm_space_node(const bContext *C)
void CTX_wm_operator_poll_msg_set(bContext *C, const char *msg)
Main * CTX_data_main(const bContext *C)
ARegion * CTX_wm_region(const bContext *C)
wmWindowManager * CTX_wm_manager(const bContext *C)
void BKE_id_free(Main *bmain, void *idv)
void BKE_id_move_to_same_lib(Main &bmain, ID &id, const ID &owner_id)
ID * BKE_id_copy(Main *bmain, const ID *id)
const char * BKE_id_name(const ID &id)
void BKE_main_ensure_invariants(Main &bmain, std::optional< blender::Span< ID * > > modified_ids=std::nullopt)
constexpr int GROUP_NODE_MIN_WIDTH
#define NODE_GROUP_OUTPUT
void BKE_ntree_update_tag_node_new(bNodeTree *ntree, bNode *node)
void BKE_ntree_update_tag_all(bNodeTree *ntree)
void BKE_ntree_update_tag_link_removed(bNodeTree *ntree)
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_reportf(ReportList *reports, eReportType type, const char *format,...) ATTR_PRINTF_FORMAT(3
void BKE_report(ReportList *reports, eReportType type, const char *message)
#define BLI_assert_msg(a, msg)
#define LISTBASE_FOREACH_MUTABLE(type, var, list)
void BLI_addtail(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
void BLI_remlink(ListBase *listbase, void *vlink) ATTR_NONNULL(1)
MINLINE void copy_v2_v2(float r[2], const float a[2])
#define BLI_SCOPED_DEFER(function_to_defer)
char * BLI_strdupn(const char *str, size_t len) ATTR_MALLOC ATTR_WARN_UNUSED_RESULT ATTR_NONNULL(1)
char * STRNCPY(char(&dst)[N], const char *src)
#define STRNCPY_UTF8(dst, src)
#define INIT_MINMAX2(min, max)
#define UNUSED_VARS_NDEBUG(...)
#define SET_FLAG_FROM_TEST(value, test, flag)
#define CTX_IFACE_(context, msgid)
#define BLT_I18NCONTEXT_OPERATOR_DEFAULT
void DEG_relations_tag_update(Main *bmain)
#define ID_IS_EDITABLE(_id)
NodeTreeInterfacePanelFlag
@ NODE_INTERFACE_PANEL_DEFAULT_CLOSED
bool ED_node_is_geometry(const SpaceNode *snode)
bNodeTree * ED_node_tree_get(SpaceNode *snode, int level)
bool ED_node_is_compositor(const SpaceNode *snode)
void ED_node_tree_pop(ARegion *region, SpaceNode *snode)
void ED_node_tree_push(ARegion *region, SpaceNode *snode, bNodeTree *ntree, bNode *gnode)
bool ED_node_is_shader(SpaceNode *snode)
bool ED_node_is_texture(SpaceNode *snode)
void ED_preview_kill_jobs(wmWindowManager *wm, Main *bmain)
bool ED_operator_node_editable(bContext *C)
bool ED_operator_node_active(bContext *C)
Read Guarded memory(de)allocation.
struct blender::bke::bNodeTreeType * ntreeType_Shader
struct blender::bke::bNodeTreeType * ntreeType_Texture
void UI_popup_menu_end(bContext *C, uiPopupMenu *pup)
uiBut * UI_but_find_mouse_over(const ARegion *region, const wmEvent *event) ATTR_WARN_UNUSED_RESULT
uiPopupMenu * UI_popup_menu_begin(bContext *C, const char *title, int icon) ATTR_NONNULL()
uiLayout * UI_popup_menu_layout(uiPopupMenu *pup)
void UI_view2d_region_to_view(const View2D *v2d, float x, float y, float *r_view_x, float *r_view_y) ATTR_NONNULL()
std::optional< Value > lookup_try(const Key &key) const
void add_new(const Key &key, const Value &value)
IndexRange index_range() const
Value & lookup_or_add_default(const Key &key)
ValueIterator values() const &
bool add(const Key &key, const Value &value)
const Value & lookup(const Key &key) const
Value lookup_default(const Key &key, const Value &default_value) const
void add_new(const Key &key, const Value &value)
ItemIterator items() const &
static RandomNumberGenerator from_random_seed()
constexpr int64_t size() const
constexpr const char * data() const
bool remove(const Key &key)
bool contains(const Key &key) const
int64_t remove_if(Predicate &&predicate)
void append(const T &value)
virtual const int & get_corresponding_output_id(const bNode &input_bnode) const =0
Vector< ItemDeclaration * > root_items
void * MEM_callocN(size_t len, const char *str)
void * MEM_malloc_arrayN(size_t len, size_t size, const char *str)
void MEM_freeN(void *vmemh)
bool unassign_action(ID &animated_id)
bool assign_action(bAction *action, ID &animated_id)
bool update_field_inferencing(const bNodeTree &tree)
bNodeTreeInterfaceSocket * add_interface_socket_from_node(bNodeTree &ntree, const bNode &from_node, const bNodeSocket &from_sock, StringRef socket_type, StringRef name)
bool update_structure_type_interface(bNodeTree &tree)
bNode * node_find_node_by_name(bNodeTree &ntree, StringRefNull name)
NodeColorTag node_color_tag(const bNode &node)
const bNodeZoneType * zone_type_by_node_type(const int node_type)
std::string node_label(const bNodeTree &ntree, const bNode &node)
void node_tree_free_tree(bNodeTree &ntree)
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)
bNode * node_add_node(const bContext *C, bNodeTree &ntree, StringRef idname, std::optional< int > unique_identifier=std::nullopt)
bNode * node_get_active(bNodeTree &ntree)
void node_unique_id(bNodeTree &ntree, bNode &node)
void node_remove_link(bNodeTree *ntree, bNodeLink &link)
Span< const bNodeZoneType * > all_zone_types()
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_rebuild_id_vector(bNodeTree &node_tree)
bNode * node_add_static_node(const bContext *C, bNodeTree &ntree, int type)
bNodeLink & node_add_link(bNodeTree &ntree, bNode &fromnode, bNodeSocket &fromsock, bNode &tonode, bNodeSocket &tosock)
Span< int > all_zone_input_node_types()
bNodeTree * node_tree_add_tree(Main *bmain, StringRef name, StringRef 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)
bool node_declaration_ensure(bNodeTree &ntree, bNode &node)
void node_set_active(bNodeTree &ntree, bNode &node)
void node_unique_name(bNodeTree &ntree, bNode &node)
bool node_link_is_hidden(const bNodeLink &link)
static bool node_default_group_width_set_poll(bContext *C)
static bNode * node_group_make_from_node_declaration(bContext &C, bNodeTree &ntree, bNode &src_node, const StringRef node_idname)
static bool prefer_node_for_interface_name(const bNode &node)
static void add_node_group_interface_from_declaration_recursive(bNodeTree &group, const bNode &src_node, const nodes::ItemDeclaration &item_decl, bNodeTreeInterfacePanel *parent, WrapperNodeGroupMapping &r_mapping)
static bool node_group_operator_active_poll(bContext *C)
static bNodeTreeInterfaceSocket * add_interface_from_socket(const bNodeTree &original_tree, bNodeTree &tree_for_interface, const bNodeSocket &socket)
static AnimationBasePathChange * animation_basepath_change_new(const StringRef src_basepath, const StringRef dst_basepath)
static VectorSet< bNode * > get_nodes_to_group(bNodeTree &node_tree, bNode *group_node)
static wmOperatorStatus node_group_insert_exec(bContext *C, wmOperator *op)
static void node_group_make_insert_selected(const bContext &C, bNodeTree &ntree, bNode *gnode, const VectorSet< bNode * > &nodes_to_move)
static wmOperatorStatus node_default_group_width_set_exec(bContext *C, wmOperator *)
bool node_deselect_all(bNodeTree &node_tree)
static void node_group_ungroup(Main *bmain, bNodeTree *ntree, bNode *gnode)
static wmOperatorStatus node_group_separate_invoke(bContext *C, wmOperator *, const wmEvent *)
static bool node_group_make_test_selected(bNodeTree &ntree, const VectorSet< bNode * > &nodes_to_group, const StringRef ntree_idname, ReportList &reports)
void NODE_OT_group_make(wmOperatorType *ot)
static void update_nested_node_refs_after_moving_nodes_into_group(bNodeTree &ntree, bNodeTree &group, bNode &gnode, const Map< int32_t, int32_t > &node_identifier_map)
static bNode * node_group_get_active(bContext *C, const StringRef node_idname)
static const EnumPropertyItem node_group_separate_types[]
void NODE_OT_group_insert(wmOperatorType *ot)
static bool node_group_separate_selected(Main &bmain, bNodeTree &ntree, bNodeTree &ngroup, const float2 &offset, const bool make_copy)
static wmOperatorStatus node_group_ungroup_exec(bContext *C, wmOperator *)
static const bNodeSocket & find_socket_to_use_for_interface(const bNodeTree &node_tree, const bNodeSocket &socket)
static wmOperatorStatus node_group_separate_exec(bContext *C, wmOperator *op)
bNode * node_under_mouse_get(const SpaceNode &snode, const float2 mouse)
static wmOperatorStatus node_group_edit_exec(bContext *C, wmOperator *op)
VectorSet< bNode * > get_selected_nodes(bNodeTree &node_tree)
static bool node_group_operator_editable(bContext *C)
float2 space_node_group_offset(const SpaceNode &snode)
static wmOperatorStatus node_group_make_exec(bContext *C, wmOperator *op)
static void get_min_max_of_nodes(const Span< bNode * > nodes, const bool use_size, float2 &min, float2 &max)
void NODE_OT_group_edit(wmOperatorType *ot)
static void update_nested_node_refs_after_ungroup(bNodeTree &ntree, const bNodeTree &ngroup, const bNode &gnode, const Map< int32_t, int32_t > &node_identifier_map)
void NODE_OT_group_separate(wmOperatorType *ot)
static bNode * node_group_make_from_nodes(const bContext &C, bNodeTree &ntree, const VectorSet< bNode * > &nodes_to_group, const StringRef ntype, const StringRef ntreetype)
void NODE_OT_group_enter_exit(wmOperatorType *ot)
static void remap_pairing(bNodeTree &dst_tree, Span< bNode * > nodes, const Map< int32_t, int32_t > &identifier_map)
void NODE_OT_default_group_width_set(wmOperatorType *ot)
static wmOperatorStatus node_group_enter_exit_invoke(bContext *C, wmOperator *, const wmEvent *event)
void NODE_OT_group_ungroup(wmOperatorType *ot)
static bNodeTree * node_group_make_wrapper(const bContext &C, const bNodeTree &src_tree, const bNode &src_node, WrapperNodeGroupMapping &r_mapping)
StringRef node_group_idname(const bContext *C)
static StringRef group_ntree_idname(bContext *C)
static void animation_basepath_change_free(AnimationBasePathChange *basepath_change)
T midpoint(const T &a, const T &b)
void min_max(const T &value, T &min, T &max)
void update_node_declaration_and_sockets(bNodeTree &ntree, bNode &node)
VecBase< float, 2 > float2
void uninitialized_copy_n(const T *src, int64_t n, T *dst)
bNodeSocket * node_group_output_find_socket(bNode *node, const StringRef identifier)
bNodeSocket * node_group_input_find_socket(bNode *node, const StringRef identifier)
bNodeSocket * node_group_find_input_socket(bNode *groupnode, const blender::StringRef identifier)
bNodeSocket * node_group_find_output_socket(bNode *groupnode, const blender::StringRef identifier)
blender::bke::bNodeTreeType * ntreeType_Composite
blender::bke::bNodeTreeType * ntreeType_Geometry
bool RNA_boolean_get(PointerRNA *ptr, const char *name)
void RNA_enum_set(PointerRNA *ptr, const char *name, int value)
PointerRNA RNA_pointer_create_discrete(ID *id, StructRNA *type, void *data)
int RNA_enum_get(PointerRNA *ptr, const char *name)
PropertyRNA * RNA_def_enum(StructOrFunctionRNA *cont_, const char *identifier, const EnumPropertyItem *items, const int default_value, const char *ui_name, const char *ui_description)
PropertyRNA * RNA_def_boolean(StructOrFunctionRNA *cont_, const char *identifier, const bool default_value, const char *ui_name, const char *ui_description)
void RNA_def_property_flag(PropertyRNA *prop, PropertyFlag flag)
std::optional< std::string > RNA_path_from_ID_to_struct(const PointerRNA *ptr)
const char * dst_basepath
const char * src_basepath
struct bNodeTree * edittree
struct bNodeTree * nodetree
bNodeTreeInterfaceItem item
struct bNodeTree * nodetree
struct bNodeTreePath * prev
bNodeTreeRuntimeHandle * runtime
bNestedNodeRef * nested_node_refs
int default_group_node_width
bNodeTreeInterface tree_interface
bNodeSocket * get_new_input(const bNodeSocket *old_socket, bNode &new_node) const
Vector< int > exposed_input_indices
Map< const bNodeSocket *, int > new_index_by_src_socket
Map< int, int > new_by_old_panel_identifier
bNodeSocket * get_new_output(const bNodeSocket *old_socket, bNode &new_node) const
Vector< int > exposed_output_indices
void operator_context_set(blender::wm::OpCallContext opcontext)
PointerRNA op(wmOperatorType *ot, std::optional< blender::StringRef > name, int icon, blender::wm::OpCallContext context, eUI_Item_Flag flag)
struct ReportList * reports
void WM_event_add_notifier(const bContext *C, uint type, void *reference)
#define ISMOUSE_BUTTON(event_type)