25struct NodeInsertOfsData;
82 :
node(socket.owner_node()),
154 :
node(socket.owner_node()),
225namespace ed::space_node {
226struct NestedTreePreviews;
293 std::unique_ptr<NodeInsertOfsData>
iofsd;
330#define BASIS_RAD (0.2f * U.widget_unit)
331#define NODE_DYS (U.widget_unit / 2)
332#define NODE_DY U.widget_unit
333#define NODE_ITEM_SPACING_Y (0.1f * U.widget_unit)
334#define NODE_WIDTH(node) (node.width * UI_SCALE_FAC)
335#define NODE_HEIGHT(node) (node.height * UI_SCALE_FAC)
336#define NODE_MARGIN_X (1.2f * U.widget_unit)
337#define NODE_SOCKSIZE (0.25f * U.widget_unit)
338#define NODE_MULTI_INPUT_LINK_GAP (0.25f * U.widget_unit)
339#define NODE_RESIZE_MARGIN (0.20f * U.widget_unit)
340#define NODE_LINK_RESOL 12
358 const bNodeTree &ntree,
359 PointerRNA &node_ptr,
360 const bNodeSocket &sock,
419 bContext &
C, SpaceNode &snode, ARegion ®ion,
int node_flag,
int smooth_viewtx);
432 const bNodeSocket &socket,
433 const bNodeLink &link);
475 std::array<float2, NODE_LINK_RESOL + 1> &coords);
747 const bNode &src_node,
755 const bNode &group_node);
781 NodeSetCopy(
bNodeTree &tree) : dst_tree_(tree) {}
813 const bNode *group_node =
nullptr);
828 const bNode &group_node,
837 const bNode &group_node,
static NodeSetCopy from_predicate(Main &bmain, const bNodeTree &src_tree, FunctionRef< bool(const bNode &node)> node_predicate, bNodeTree &dst_tree)
const Map< int32_t, int32_t > & node_identifier_map() const
static NodeSetCopy from_nodes(Main &bmain, const bNodeTree &src_tree, const Span< const bNode * > src_nodes, bNodeTree &dst_tree)
bNodeTree & dst_tree() const
const Map< const bNode *, bNode * > & node_map() const
Map< const bNodeTreeInterfaceSocket *, InterfaceSocketData > socket_data
Map< const bNodeTreeInterfacePanel *, InterfacePanelData > panel_data
void NODE_OT_parent_set(wmOperatorType *ot)
void NODE_OT_test_inlining_shader_nodes(wmOperatorType *ot)
void NODE_OT_delete(wmOperatorType *ot)
void NODE_OT_add_group_input_node(wmOperatorType *ot)
void NODE_OT_cryptomatte_layer_add(wmOperatorType *ot)
void NODE_OT_add_object(wmOperatorType *ot)
float node_socket_calculate_height(const bNodeSocket &socket)
void NODE_OT_read_viewlayers(wmOperatorType *ot)
wmKeyMap * node_resize_modal_keymap(wmKeyConfig *keyconf)
rctf node_frame_rect_inside(const SpaceNode &snode, const bNode &node)
void NODE_OT_clipboard_copy(wmOperatorType *ot)
void node_deselect_all_input_sockets(bNodeTree &node_tree, bool deselect_nodes)
int node_get_resize_cursor(NodeResizeDirection directions)
void NODE_OT_comment_edit(wmOperatorType *ot)
void NODE_OT_select_circle(wmOperatorType *ot)
void node_geometry_add_attribute_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, ui::Layout &layout, const StringRef placeholder)
void tree_draw_order_update(bNodeTree &ntree)
void NODE_OT_add_mask(wmOperatorType *ot)
bool space_node_view_flag(bContext &C, SpaceNode &snode, ARegion ®ion, int node_flag, int smooth_viewtx)
bNode * add_static_node(const bContext &C, int type, const float2 &location)
void NODE_OT_backimage_sample(wmOperatorType *ot)
void invoke_node_link_drag_add_menu(bContext &C, bNode &node, bNodeSocket &socket, const float2 &cursor)
void NODE_OT_add_reroute(wmOperatorType *ot)
void NODE_OT_node_copy_color(wmOperatorType *ot)
float2 node_from_view(const float2 &co)
void node_draw_link_bezier(const bContext &C, const View2D &v2d, const SpaceNode &snode, const bNodeLink &link, const int th_col1, const int th_col2, const int th_col3, const bool selected)
void NODE_OT_detach(wmOperatorType *ot)
bool composite_node_editable(bContext *C)
void NODE_OT_viewer_border(wmOperatorType *ot)
void node_select_paired(bNodeTree &node_tree)
bool all_links_muted(const bNodeSocket &socket)
void NODE_OT_find_node(wmOperatorType *ot)
void NODE_OT_activate_viewer(wmOperatorType *ot)
void NODE_OT_select_lasso(wmOperatorType *ot)
bool node_deselect_all(bNodeTree &node_tree)
MenuType swap_root_catalogs_menu_type()
void NODE_OT_new_compositing_node_group(wmOperatorType *ot)
void NODE_OT_add_collection(wmOperatorType *ot)
void node_socket_select(bNode *node, bNodeSocket &sock)
void nodesocket_batch_start()
void node_geometry_add_volume_grid_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, ui::Layout &layout, const StringRef placeholder)
std::array< float2, 4 > node_link_bezier_points_dragged(const SpaceNode &snode, const bNodeLink &link)
bNodeSocket * node_find_indicated_socket(SpaceNode &snode, ARegion ®ion, const float2 &cursor, const eNodeSocketInOut in_out)
void NODE_OT_backimage_zoom(wmOperatorType *ot)
void NODE_OT_select(wmOperatorType *ot)
void UI_node_socket_draw_cache_flush()
void node_socket_color_get(const bContext &C, const bNodeTree &ntree, PointerRNA &node_ptr, const bNodeSocket &sock, float r_color[4])
void NODE_OT_insert_offset(wmOperatorType *ot)
Array< bNode * > tree_draw_order_calc_nodes_reversed(bNodeTree &ntree)
void NODE_OT_group_make(wmOperatorType *ot)
void NODE_OT_deactivate_viewer(wmOperatorType *ot)
void node_set_cursor(wmWindow &win, ARegion ®ion, SpaceNode &snode, const float2 &cursor)
void node_draw_link(const bContext &C, const View2D &v2d, const SpaceNode &snode, const bNodeLink &link, const bool selected)
void NODE_OT_add_group_asset(wmOperatorType *ot)
float2 node_link_calculate_multi_input_position(const float2 &socket_position, const int index, const int total_inputs)
void NODE_OT_resize(wmOperatorType *ot)
void NODE_OT_backimage_move(wmOperatorType *ot)
void NODE_OT_clipboard_paste(wmOperatorType *ot)
void NODE_OT_render_changed(wmOperatorType *ot)
void NODE_GGT_backdrop_split(wmGizmoGroupType *gzgt)
void node_socket_add_tooltip(const bNodeTree &ntree, const bNodeSocket &sock, ui::Layout &layout)
GroupInputOutputNodes connect_copied_nodes_to_interface(const bContext &C, const NodeSetCopy &copied_nodes, const NodeTreeInterfaceMapping &io_mapping)
void NODE_OT_links_detach(wmOperatorType *ot)
void node_draw_link_dragged(const bContext &C, const View2D &v2d, const SpaceNode &snode, const bNodeLink &link)
void NODE_OT_group_insert(wmOperatorType *ot)
void node_socket_deselect(bNode *node, bNodeSocket &sock, bool deselect_node)
MenuType catalog_assets_menu_type()
void NODE_OT_delete_reconnect(wmOperatorType *ot)
Map< std::string, bNode * > InterfaceProxyNodes
void NODE_OT_shader_script_update(wmOperatorType *ot)
void NODE_GGT_backdrop_corner_pin(wmGizmoGroupType *gzgt)
void NODE_OT_links_cut(wmOperatorType *ot)
void NODE_OT_hide_socket_toggle(wmOperatorType *ot)
void node_tree_interface_panel_register(ARegionType *art)
MenuType add_root_catalogs_menu_type()
void build_socket_tooltip(ui::TooltipData &tip_data, bContext &C, ui::Button *but, const bNodeTree &tree, const bNodeSocket &socket)
void node_set_hidden_sockets(bNode *node, int set)
void NODE_OT_swap_group_asset(wmOperatorType *ot)
bool node_is_previewable(const SpaceNode &snode, const bNodeTree &ntree, const bNode &node)
void NODE_OT_select_grouped(wmOperatorType *ot)
void draw_nodespace_back_pix(const bContext &C, ARegion ®ion, SpaceNode &snode, bNodeInstanceKey parent_key)
void remap_node_pairing(bNodeTree &dst_tree, const Map< const bNode *, bNode * > &node_map)
NodeTreeInterfaceMapping build_node_set_interface(const NodeSetInterfaceParams ¶ms, const bNodeTree &src_tree, const Span< bNode * > src_nodes, bNodeTree &dst_tree)
float node_link_dim_factor(const View2D &v2d, const bNodeLink &link)
void node_bundle_type_add_string_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, ui::Layout &layout, const StringRef placeholder)
NodeTreeInterfaceMapping build_node_declaration_interface(const NodeSetInterfaceParams ¶ms, const bNode &src_node, bNodeTree &dst_tree)
void NODE_OT_join(wmOperatorType *ot)
ENUM_OPERATORS(NodeResizeDirection)
void NODE_OT_add_color(wmOperatorType *ot)
bNode * add_node(const bContext &C, const UString idname, const float2 &location)
bNode * node_under_mouse_get(const SpaceNode &snode, const float2 mouse)
void NODE_OT_attach(wmOperatorType *ot)
UString node_group_idname(const bContext *C)
bool node_link_is_hidden_or_dimmed(const View2D &v2d, const bNodeLink &link)
void NODE_OT_view_selected(wmOperatorType *ot)
void update_nested_node_refs_after_ungroup(bNodeTree &dst_tree, const bNode &group_node, const NodeSetCopy &node_set_copy)
std::optional< float2 > link_path_intersection(const bNodeLink &link, const Span< float2 > path)
void NODE_OT_link_viewer(wmOperatorType *ot)
void NODE_GGT_backdrop_crop(wmGizmoGroupType *gzgt)
void NODE_OT_select_linked_from(wmOperatorType *ot)
void NODE_OT_new_compositor_sequencer_node_group(wmOperatorType *operator_type)
void nodesocket_batch_end()
void node_deselect_all_output_sockets(bNodeTree &node_tree, bool deselect_nodes)
void NODE_OT_link_drag_operation_test(wmOperatorType *ot)
Array< bNode * > tree_draw_order_calc_nodes(bNodeTree &ntree)
Vector< ui::ContextPathItem > context_path_for_space_node(const bContext &C)
float2 node_to_view(const float2 &co)
void NODE_OT_select_same_type_step(wmOperatorType *ot)
void node_select_single(bContext &C, bNode &node)
float2 space_node_group_offset(const SpaceNode &snode)
void NODE_GGT_backdrop_box_mask(wmGizmoGroupType *gzgt)
void NODE_OT_preview_toggle(wmOperatorType *ot)
void NODE_OT_clear_viewer_border(wmOperatorType *ot)
void NODE_OT_select_linked_to(wmOperatorType *ot)
void NODE_OT_link_make(wmOperatorType *ot)
void connect_group_node_to_external_sockets(bNode &group_node, const NodeTreeInterfaceMapping &io_mapping)
void node_link_bezier_points_evaluated(const bNodeLink &link, std::array< float2, NODE_LINK_RESOL+1 > &coords)
void NODE_OT_view_all(wmOperatorType *ot)
wmKeyMap * node_link_modal_keymap(wmKeyConfig *keyconf)
void NODE_OT_group_edit(wmOperatorType *ot)
bool node_or_socket_isect_event(const bContext &C, const wmEvent &event)
void node_operatortypes()
void NODE_OT_duplicate_compositing_modifier_node_group(wmOperatorType *ot)
void NODE_GGT_backdrop_transform(wmGizmoGroupType *gzgt)
void NODE_OT_group_separate(wmOperatorType *ot)
float2 socket_link_connection_location(const bNode &node, const bNodeSocket &socket, const bNodeLink &link)
void NODE_OT_add_import_node(wmOperatorType *ot)
void NODE_OT_sockets_sync(wmOperatorType *ot)
void NODE_OT_duplicate(wmOperatorType *ot)
NodeResizeDirection node_get_resize_direction(const SpaceNode &snode, const bNode *node, const int x, const int y)
void NODE_OT_join_nodes(wmOperatorType *ot)
bool node_has_hidden_sockets(bNode *node)
void nodelink_batch_end(const SpaceNode &snode)
void NODE_GGT_compositor_translate(wmGizmoGroupType *gzgt)
void nodelink_batch_start(const SpaceNode &)
void NODE_OT_add_image(wmOperatorType *ot)
void NODE_OT_options_toggle(wmOperatorType *ot)
void node_keymap(wmKeyConfig *keyconf)
void NODE_OT_toggle_viewer(wmOperatorType *ot)
NodeTreeInterfaceMapping map_group_node_interface(const NodeSetInterfaceParams ¶ms, const bNodeTree &tree, const bNode &group_node)
void NODE_OT_add_group(wmOperatorType *ot)
void node_to_updated_rect(const bNode &node, rctf &r_rect)
void NODE_GGT_backdrop_ellipse_mask(wmGizmoGroupType *gzgt)
bool composite_node_active(bContext *C)
void NODE_GGT_compositor_transform(wmGizmoGroupType *gzgt)
void node_draw_space(const bContext &C, ARegion ®ion)
void NODE_OT_group_enter_exit(wmOperatorType *ot)
void NODE_OT_link(wmOperatorType *ot)
wmOperatorStatus node_render_changed_exec(bContext *C, wmOperator *)
void NODE_OT_collapse_toggle(wmOperatorType *ot)
void NODE_OT_links_mute(wmOperatorType *ot)
void NODE_OT_default_group_width_set(wmOperatorType *ot)
MenuType unassigned_assets_menu_type()
void NODE_OT_add_material(wmOperatorType *ot)
void NODE_OT_select_box(wmOperatorType *ot)
void NODE_OT_select_all(wmOperatorType *ot)
void NODE_GGT_compositor_scale(wmGizmoGroupType *gzgt)
bNodeSocket * get_main_socket(bNodeTree &ntree, bNode &node, eNodeSocketInOut in_out)
void NODE_OT_group_ungroup(wmOperatorType *ot)
void NODE_OT_new_node_tree(wmOperatorType *ot)
void node_geometry_add_layer_search_button(const bContext &, const bNode &node, PointerRNA &socket_ptr, ui::Layout &layout, const StringRef placeholder)
void update_multi_input_indices_for_removed_links(bNode &node)
void NODE_GGT_backdrop_glare(wmGizmoGroupType *gzgt)
void update_nested_node_refs_after_moving_nodes_into_group(bNodeTree &src_tree, const bNode &group_node, const NodeSetCopy &node_set_copy)
void NODE_OT_cryptomatte_layer_remove(wmOperatorType *ot)
void NODE_OT_backimage_fit(wmOperatorType *ot)
void NODE_OT_mute_toggle(wmOperatorType *ot)
InterfaceProxyNodes connect_copied_nodes_to_external_sockets(bContext &C, const bNodeTree &src_tree, const NodeSetCopy &copied_nodes, const NodeTreeInterfaceMapping &io_mapping, const bNode *group_node)
unsigned __int64 uint64_t
const char * node_context_dir[]
VecBase< float, 2 > float2
constexpr uint64_t get_default_hash(const T &v, const Args &...args)
uint64_t operator()(const bNodeSocket &socket) const
uint64_t operator()(const MutableNodeAndSocket &value) const
uint64_t operator()(const NodeAndSocket &value) const
uint64_t operator()(const bNodeSocket &socket) const
friend bool operator==(const MutableNodeAndSocket &a, const MutableNodeAndSocket &b)
const bNodeSocket * find_socket_in_node(const bNode &other_node) const
MutableNodeAndSocket(bNode &node, bNodeSocket &socket, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
std::optional< int > multi_input_sort_id
NodeAndSocket operator()() const
MutableNodeAndSocket(bNodeSocket &socket, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
MutableNodeAndSocket(bNode &node, const StringRef socket_identifier, const eNodeSocketInOut in_out, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
bNodeSocket * find_socket() const
std::string socket_identifier
std::optional< int > multi_input_sort_id
NodeAndSocket(const bNode &node, const bNodeSocket &socket, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
const bNodeSocket * find_socket_in_node(const bNode &other_node) const
const bNodeSocket * find_socket() const
friend bool operator==(const NodeAndSocket &a, const NodeAndSocket &b)
std::string socket_identifier
NodeAndSocket(const bNode &node, const StringRef socket_identifier, const eNodeSocketInOut in_out, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
NodeAndSocket(const bNodeSocket &socket, const bool link_muted, std::optional< int > multi_input_sort_id=std::nullopt)
VectorSet< NodeAndSocket > internal_sockets
VectorSet< MutableNodeAndSocket > external_sockets
std::optional< int > frame_identifier_to_highlight
std::unique_ptr< bNodeLinkDrag > linkdrag
Map< ComputeContextHash, std::unique_ptr< space_node::NestedTreePreviews > > tree_previews_per_context
Map< int, bool > node_can_sync_states
std::unique_ptr< NodeInsertOfsData > iofsd
std::shared_ptr< asset::AssetItemTree > assets_for_menu
Vector< bNodeLink > links
ui::View2DEdgePanData pan_data
bNodeSocket * hovered_socket
bNodeLink * last_picked_multi_input_socket_link
bNode * last_node_hovered_while_dragging_a_link
std::array< int, 2 > cursor
bNodeSocket * start_socket