Blender V4.3
blender::bke::node_field_inferencing::SocketDeclaration Class Referenceabstract

#include <NOD_node_declaration.hh>

Inherits blender::nodes::ItemDeclaration.

Inherited by blender::nodes::decl::Bool, blender::nodes::decl::Color, blender::nodes::decl::Custom, blender::nodes::decl::Extend, blender::nodes::decl::Float, blender::nodes::decl::Geometry, blender::nodes::decl::IDSocketDeclaration, blender::nodes::decl::Int, blender::nodes::decl::Matrix, blender::nodes::decl::Menu, blender::nodes::decl::Rotation, blender::nodes::decl::Shader, blender::nodes::decl::String, and blender::nodes::decl::Vector.

Public Member Functions

virtual ~SocketDeclaration ()=default
virtual bNodeSocketbuild (bNodeTree &ntree, bNode &node) const=0
virtual bool matches (const bNodeSocket &socket) const=0
virtual bNodeSocketupdate_or_build (bNodeTree &ntree, bNode &node, bNodeSocket &socket) const
virtual bool can_connect (const bNodeSocket &socket) const=0
void make_available (bNode &node) const
const CompositorInputRealizationOptionscompositor_realization_options () const
int compositor_domain_priority () const
bool compositor_expects_single_value () const
Public Member Functions inherited from blender::nodes::ItemDeclaration
virtual ~ItemDeclaration ()=default

Public Attributes

std::string name
std::string short_label
std::string identifier
std::string description
std::string translation_context
eNodeSocketInOut in_out
eNodeSocketDatatype socket_type
bool hide_label = false
bool hide_value = false
bool compact = false
bool is_multi_input = false
bool no_mute_links = false
bool is_available = true
bool is_attribute_name = false
bool is_default_link_socket = false
bool align_with_previous_socket = false
InputSocketFieldType input_field_type = InputSocketFieldType::None
OutputFieldDependency output_field_dependency
std::unique_ptr< ImplicitInputValueFnimplicit_input_fn
std::unique_ptr< SocketNameRNA > socket_name_rna
friend NodeDeclarationBuilder

Protected Member Functions

void set_common_flags (bNodeSocket &socket) const
bool matches_common_data (const bNodeSocket &socket) const

Friends

class BaseSocketDeclarationBuilder
template<typename SocketDecl>
class SocketDeclarationBuilder

Detailed Description

Describes a single input or output socket. This is subclassed for different socket types.

Definition at line 170 of file NOD_node_declaration.hh.

Constructor & Destructor Documentation

◆ ~SocketDeclaration()

virtual blender::nodes::SocketDeclaration::~SocketDeclaration ( )
virtualdefault

Member Function Documentation

◆ build()

virtual bNodeSocket & blender::nodes::SocketDeclaration::build ( bNodeTree & ntree,
bNode & node ) const
pure virtual

◆ can_connect()

virtual bool blender::nodes::SocketDeclaration::can_connect ( const bNodeSocket & socket) const
pure virtual

Determine if a new socket described by this declaration could have a valid connection the other socket.

◆ compositor_domain_priority()

int blender::nodes::SocketDeclaration::compositor_domain_priority ( ) const

Definition at line 856 of file node_declaration.cc.

◆ compositor_expects_single_value()

bool blender::nodes::SocketDeclaration::compositor_expects_single_value ( ) const

Definition at line 861 of file node_declaration.cc.

◆ compositor_realization_options()

const CompositorInputRealizationOptions & blender::nodes::SocketDeclaration::compositor_realization_options ( ) const

Definition at line 851 of file node_declaration.cc.

◆ make_available()

void blender::nodes::SocketDeclaration::make_available ( bNode & node) const

Change the node such that the socket will become visible. The node type's update method should be called afterwards.

Note
this is not necessarily implemented for all node types.

Definition at line 866 of file node_declaration.cc.

◆ matches()

virtual bool blender::nodes::SocketDeclaration::matches ( const bNodeSocket & socket) const
pure virtual

◆ matches_common_data()

bool blender::nodes::SocketDeclaration::matches_common_data ( const bNodeSocket & socket) const
protected

Definition at line 328 of file node_declaration.cc.

◆ set_common_flags()

void blender::nodes::SocketDeclaration::set_common_flags ( bNodeSocket & socket) const
protected

Definition at line 318 of file node_declaration.cc.

◆ update_or_build()

bNodeSocket & blender::nodes::SocketDeclaration::update_or_build ( bNodeTree & ntree,
bNode & node,
bNodeSocket & socket ) const
virtual

Definition at line 308 of file node_declaration.cc.

◆ BaseSocketDeclarationBuilder

friend class BaseSocketDeclarationBuilder
friend

Definition at line 222 of file NOD_node_declaration.hh.

◆ SocketDeclarationBuilder

template<typename SocketDecl>
friend class SocketDeclarationBuilder
friend

Definition at line 223 of file NOD_node_declaration.hh.

Member Data Documentation

◆ align_with_previous_socket

bool blender::nodes::SocketDeclaration::align_with_previous_socket = false

Puts this socket on the same line as the previous one in the UI.

Definition at line 191 of file NOD_node_declaration.hh.

◆ compact

bool blender::nodes::SocketDeclaration::compact = false

Definition at line 184 of file NOD_node_declaration.hh.

◆ description

std::string blender::nodes::SocketDeclaration::description

Definition at line 175 of file NOD_node_declaration.hh.

◆ hide_label

bool blender::nodes::SocketDeclaration::hide_label = false

Definition at line 182 of file NOD_node_declaration.hh.

◆ hide_value

bool blender::nodes::SocketDeclaration::hide_value = false

Definition at line 183 of file NOD_node_declaration.hh.

◆ identifier

std::string blender::nodes::SocketDeclaration::identifier

Definition at line 174 of file NOD_node_declaration.hh.

◆ implicit_input_fn

std::unique_ptr<ImplicitInputValueFn> blender::nodes::SocketDeclaration::implicit_input_fn

Some input sockets can have non-trivial values in the case when they are unlinked. This callback computes the default input of a values in geometry nodes when nothing is linked.

Definition at line 214 of file NOD_node_declaration.hh.

◆ in_out

eNodeSocketInOut blender::nodes::SocketDeclaration::in_out

Defined by whether the socket is part of the node's input or output socket declaration list. Included here for convenience.

Definition at line 179 of file NOD_node_declaration.hh.

◆ input_field_type

InputSocketFieldType blender::nodes::SocketDeclaration::input_field_type = InputSocketFieldType::None

Definition at line 193 of file NOD_node_declaration.hh.

◆ is_attribute_name

bool blender::nodes::SocketDeclaration::is_attribute_name = false

Definition at line 188 of file NOD_node_declaration.hh.

◆ is_available

bool blender::nodes::SocketDeclaration::is_available = true

Definition at line 187 of file NOD_node_declaration.hh.

◆ is_default_link_socket

bool blender::nodes::SocketDeclaration::is_default_link_socket = false

Definition at line 189 of file NOD_node_declaration.hh.

◆ is_multi_input

bool blender::nodes::SocketDeclaration::is_multi_input = false

Definition at line 185 of file NOD_node_declaration.hh.

◆ name

std::string blender::nodes::SocketDeclaration::name

Definition at line 172 of file NOD_node_declaration.hh.

◆ no_mute_links

bool blender::nodes::SocketDeclaration::no_mute_links = false

Definition at line 186 of file NOD_node_declaration.hh.

◆ NodeDeclarationBuilder

friend blender::nodes::SocketDeclaration::NodeDeclarationBuilder

Definition at line 221 of file NOD_node_declaration.hh.

◆ output_field_dependency

OutputFieldDependency blender::nodes::SocketDeclaration::output_field_dependency

Definition at line 194 of file NOD_node_declaration.hh.

◆ short_label

std::string blender::nodes::SocketDeclaration::short_label

Definition at line 173 of file NOD_node_declaration.hh.

◆ socket_name_rna

std::unique_ptr<SocketNameRNA> blender::nodes::SocketDeclaration::socket_name_rna

Property that stores the name of the socket so that it can be modified directly from the node without going to the side-bar.

Definition at line 219 of file NOD_node_declaration.hh.

◆ socket_type

eNodeSocketDatatype blender::nodes::SocketDeclaration::socket_type

Socket type that corresponds to this socket declaration.

Definition at line 181 of file NOD_node_declaration.hh.

◆ translation_context

std::string blender::nodes::SocketDeclaration::translation_context

Definition at line 176 of file NOD_node_declaration.hh.


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