|
Blender V4.5
|
Functions | |
Link Viewer Operator | |
| static bool | socket_can_be_viewed (const bNodeSocket &socket) |
| static bNodeSocket * | node_link_viewer_get_socket (bNodeTree &ntree, bNode &viewer_node, bNodeSocket &src_socket) |
| static bool | is_viewer_node (const bNode &node) |
| static bool | is_viewer_socket_in_viewer (const bNodeSocket &socket) |
| static bool | is_viewer_socket (const bNodeSocket &socket) |
| static int | get_default_viewer_type (const bContext *C) |
| static void | remove_links_to_unavailable_viewer_sockets (bNodeTree &btree, bNode &viewer_node) |
| static bNodeSocket * | determine_socket_to_view (bNode &node_to_view) |
| static void | finalize_viewer_link (const bContext &C, SpaceNode &snode, bNode &viewer_node, bNodeLink &viewer_link) |
| static const bNode * | find_overlapping_node (const bNodeTree &tree, const rctf &rect, const Span< const bNode * > ignored_nodes) |
| static Vector< float2 > | get_viewer_node_position_candidates (const float2 initial, const float step_distance, const float max_distance) |
| static void | position_viewer_node (const bContext &C, bNodeTree &tree, bNode &viewer_node, const bNode &node_to_view) |
| static int | view_socket (const bContext &C, SpaceNode &snode, bNodeTree &btree, bNode &bnode_to_view, bNodeSocket &bsocket_to_view) |
| static int | node_link_viewer (const bContext &C, bNode &bnode_to_view, bNodeSocket *bsocket_to_view) |
|
static |
Definition at line 496 of file node_relationships.cc.
References determine_socket_to_view(), bNode::flag, blender::IndexRange::IndexRange(), is_viewer_socket(), NODE_DO_OUTPUT, blender::ed::space_node::node_to_view(), SOCK_GEOMETRY, socket_can_be_viewed(), and bNodeSocket::type.
Referenced by determine_socket_to_view(), and node_link_viewer().
|
static |
Definition at line 573 of file node_relationships.cc.
References blender::ed::viewer_path::activate_geometry_node(), BKE_main_ensure_invariants(), BKE_ntree_update_tag_active_output_changed(), C, CTX_data_main(), SpaceNode::edittree, finalize_viewer_link(), bNode::flag, bNodeLink::flag, bNodeTree::id, NODE_DO_OUTPUT, NODE_LINK_MUTED, NODE_MUTED, SpaceNode::nodetree, NTREE_COMPOSIT, NTREE_GEOMETRY, remove_links_to_unavailable_viewer_sockets(), and bNodeTree::type.
Referenced by finalize_viewer_link(), and view_socket().
|
static |
Definition at line 598 of file node_relationships.cc.
References BLI_rctf_isect(), blender::Span< T >::contains(), and find_overlapping_node().
Referenced by find_overlapping_node(), and position_viewer_node().
|
static |
Definition at line 479 of file node_relationships.cc.
References C, CMP_NODE_VIEWER, CTX_wm_space_node(), ED_node_is_compositor(), GEO_NODE_VIEWER, and get_default_viewer_type().
Referenced by get_default_viewer_type(), and view_socket().
|
static |
Builds a list of possible locations for the viewer node that follows some search pattern where positions closer to the initial position come first.
Definition at line 620 of file node_relationships.cc.
References angle(), blender::Vector< T, InlineBufferCapacity, Allocator >::append(), arc_length(), ceilf, distance(), get_viewer_node_position_candidates(), i, blender::IndexRange::IndexRange(), and M_PI.
Referenced by get_viewer_node_position_candidates(), and position_viewer_node().
|
static |
Definition at line 456 of file node_relationships.cc.
References CMP_NODE_VIEWER, ELEM, GEO_NODE_VIEWER, is_viewer_node(), and bNode::type_legacy.
Referenced by is_viewer_node(), is_viewer_socket(), is_viewer_socket_in_viewer(), and view_socket().
|
static |
Definition at line 471 of file node_relationships.cc.
References is_viewer_node(), is_viewer_socket(), and is_viewer_socket_in_viewer().
Referenced by determine_socket_to_view(), is_viewer_socket(), and view_socket().
|
static |
Definition at line 461 of file node_relationships.cc.
References BLI_assert, GEO_NODE_VIEWER, is_viewer_node(), is_viewer_socket_in_viewer(), and bNode::typeinfo.
Referenced by is_viewer_socket(), and is_viewer_socket_in_viewer().
|
static |
Definition at line 804 of file node_relationships.cc.
References C, CTX_wm_space_node(), determine_socket_to_view(), SpaceNode::edittree, node_link_viewer(), OPERATOR_CANCELLED, and view_socket().
Referenced by blender::ed::space_node::node_active_link_viewer_exec(), and node_link_viewer().
|
static |
Find the socket to link to in a viewer node.
Definition at line 427 of file node_relationships.cc.
References BLI_assert, CD_AUTO_FROM_NAME, NodeGeometryViewer::data_type, ListBase::first, GEO_NODE_VIEWER, bNode::inputs, ListBase::last, node_link_viewer_get_socket(), SOCK_GEOMETRY, socket_can_be_viewed(), blender::bke::socket_type_to_custom_data_type(), bNode::storage, bNodeSocket::type, bNode::type_legacy, and blender::nodes::update_node_declaration_and_sockets().
Referenced by node_link_viewer_get_socket(), and view_socket().
|
static |
Positions the viewer node so that it is slightly to the right and top of the node to view. The algorithm tries to avoid moving the viewer to a place where it would overlap with other nodes. For that it iterates over many possible locations with increasing distance to the node to view.
Definition at line 647 of file node_relationships.cc.
References BKE_area_find_region_type(), BLI_rctf_inside_rctf(), BLI_rctf_pad(), BLI_rctf_size_x(), BLI_rctf_size_y(), C, CTX_wm_area(), CTX_wm_region(), find_overlapping_node(), get_viewer_node_position_candidates(), bNode::location, blender::ed::space_node::node_to_view(), bNode::parent, position_viewer_node(), RGN_TYPE_UI, bNode::runtime, blender::ed::space_node::tree_draw_order_update(), U, bNode::ui_order, UI_SCALE_FAC, UI_view2d_region_to_view_rctf(), USER_REGION_OVERLAP, ARegion::v2d, bNode::width, ARegion::winx, ARegion::winy, rctf::xmax, rctf::xmin, rctf::ymax, and rctf::ymin.
Referenced by position_viewer_node(), and view_socket().
|
static |
Definition at line 485 of file node_relationships.cc.
References bNodeTree::links, LISTBASE_FOREACH_MUTABLE, blender::bke::node_remove_link(), remove_links_to_unavailable_viewer_sockets(), and SOCK_UNAVAIL.
Referenced by finalize_viewer_link(), and remove_links_to_unavailable_viewer_sockets().
|
static |
Definition at line 401 of file node_relationships.cc.
References ELEM, bNodeSocket::idname, NTREE_GEOMETRY, SOCK_BOOLEAN, SOCK_FLOAT, SOCK_GEOMETRY, SOCK_INT, SOCK_MATRIX, SOCK_MENU, SOCK_RGBA, SOCK_ROTATION, SOCK_VECTOR, socket_can_be_viewed(), STREQ, bNodeSocket::type, and bNodeSocket::typeinfo.
Referenced by determine_socket_to_view(), node_link_viewer_get_socket(), and socket_can_be_viewed().
|
static |
Definition at line 733 of file node_relationships.cc.
References blender::ed::space_node::add_static_node(), BKE_ntree_update_tag_link_changed(), C, ELEM, finalize_viewer_link(), bNodeSocket::flag, bNodeLink::fromnode, bNodeLink::fromsock, get_default_viewer_type(), is_viewer_node(), is_viewer_socket(), bNodeTree::links, LISTBASE_FOREACH_MUTABLE, blender::bke::node_add_link(), NODE_DO_OUTPUT, node_link_viewer_get_socket(), NODE_VIEWER_SHORTCUT_NONE, OPERATOR_CANCELLED, OPERATOR_FINISHED, position_viewer_node(), bNodeSocket::runtime, SOCK_HIDDEN, UI_SCALE_FAC, and view_socket().
Referenced by node_link_viewer(), and view_socket().