Blender V5.0
blender::nodes::GatherLinkSearchOpParams Class Reference

#include <NOD_socket_search_link.hh>

Public Member Functions

 GatherLinkSearchOpParams (const bke::bNodeType &node_type, const SpaceNode &snode, const bNodeTree &node_tree, const bNodeSocket &other_socket, Vector< SocketLinkOperation > &items)
const bNodeSocketother_socket () const
const SpaceNodespace_node () const
const bNodeTreenode_tree () const
const bke::bNodeTypenode_type () const
eNodeSocketInOut in_out () const
void add_item (std::string socket_name, SocketLinkOperation::LinkSocketFn fn, int weight=0)
void add_item_full_name (std::string name, SocketLinkOperation::LinkSocketFn fn, int weight=0)

Detailed Description

Definition at line 75 of file NOD_socket_search_link.hh.

Constructor & Destructor Documentation

◆ GatherLinkSearchOpParams()

blender::nodes::GatherLinkSearchOpParams::GatherLinkSearchOpParams ( const bke::bNodeType & node_type,
const SpaceNode & snode,
const bNodeTree & node_tree,
const bNodeSocket & other_socket,
Vector< SocketLinkOperation > & items )
inline

Definition at line 88 of file NOD_socket_search_link.hh.

References node_tree(), node_type(), and other_socket().

Member Function Documentation

◆ add_item()

void blender::nodes::GatherLinkSearchOpParams::add_item ( std::string socket_name,
SocketLinkOperation::LinkSocketFn fn,
int weight = 0 )
Parameters
weightUsed to customize the order when multiple search items match.
Warning
When creating lambdas for the fn argument, be careful not to capture this class itself, since it is temporary. That is why we tend to use the same variable name for this class (params) that we do for the argument to LinkSocketFn.

Definition at line 23 of file socket_search_link.cc.

References add_item_full_name(), IFACE_, name, and UI_MENU_ARROW_SEP.

◆ add_item_full_name()

void blender::nodes::GatherLinkSearchOpParams::add_item_full_name ( std::string name,
SocketLinkOperation::LinkSocketFn fn,
int weight = 0 )

Same as add_item, but the provide the full name of the menu entry instead of just the socket name.

Definition at line 34 of file socket_search_link.cc.

References name.

Referenced by add_item().

◆ in_out()

eNodeSocketInOut blender::nodes::GatherLinkSearchOpParams::in_out ( ) const

Whether to list the input or output sockets of the node.

Definition at line 61 of file socket_search_link.cc.

References SOCK_IN, and SOCK_OUT.

◆ node_tree()

const bNodeTree & blender::nodes::GatherLinkSearchOpParams::node_tree ( ) const

The node tree the user is editing when the search menu is created.

Definition at line 51 of file socket_search_link.cc.

Referenced by GatherLinkSearchOpParams().

◆ node_type()

const bke::bNodeType & blender::nodes::GatherLinkSearchOpParams::node_type ( ) const

The type of the node in the current callback.

Definition at line 56 of file socket_search_link.cc.

Referenced by GatherLinkSearchOpParams().

◆ other_socket()

const bNodeSocket & blender::nodes::GatherLinkSearchOpParams::other_socket ( ) const

The node on the other side of the dragged link.

Definition at line 41 of file socket_search_link.cc.

Referenced by GatherLinkSearchOpParams().

◆ space_node()

const SpaceNode & blender::nodes::GatherLinkSearchOpParams::space_node ( ) const

The currently active node editor.

Definition at line 46 of file socket_search_link.cc.


The documentation for this class was generated from the following files: