Blender V4.3
blender::nodes::decl::IDSocketDeclaration Class Reference

#include <NOD_socket_declarations.hh>

Inherits blender::nodes::SocketDeclaration.

Inherited by blender::nodes::decl::Collection, blender::nodes::decl::Image, blender::nodes::decl::Material, blender::nodes::decl::Object, and blender::nodes::decl::Texture.

Public Member Functions

#IDSocketDeclaration and Children Inline Methods
 IDSocketDeclaration (const char *idname)
 
#IDSocketDeclaration
bNodeSocketbuild (bNodeTree &ntree, bNode &node) const override
 
bool matches (const bNodeSocket &socket) const override
 
bNodeSocketupdate_or_build (bNodeTree &ntree, bNode &node, bNodeSocket &socket) const override
 
bool can_connect (const bNodeSocket &socket) const override
 
- Public Member Functions inherited from blender::nodes::SocketDeclaration
virtual ~SocketDeclaration ()=default
 
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

const char * idname
 
std::function< ID *(const bNode &node)> default_value_fn
 
- Public Attributes inherited from blender::nodes::SocketDeclaration
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< SocketNameRNAsocket_name_rna
 
friend NodeDeclarationBuilder
 

Additional Inherited Members

- Protected Member Functions inherited from blender::nodes::SocketDeclaration
void set_common_flags (bNodeSocket &socket) const
 
bool matches_common_data (const bNodeSocket &socket) const
 

Detailed Description

Definition at line 239 of file NOD_socket_declarations.hh.

Constructor & Destructor Documentation

◆ IDSocketDeclaration()

blender::nodes::decl::IDSocketDeclaration::IDSocketDeclaration ( const char * idname)
inline

Definition at line 529 of file NOD_socket_declarations.hh.

Member Function Documentation

◆ build()

◆ can_connect()

bool blender::nodes::decl::IDSocketDeclaration::can_connect ( const bNodeSocket & socket) const
overridevirtual

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

Implements blender::nodes::SocketDeclaration.

Definition at line 619 of file node_socket_declarations.cc.

References bNodeSocket::idname, blender::nodes::decl::sockets_can_connect(), and STREQ.

◆ matches()

bool blender::nodes::decl::IDSocketDeclaration::matches ( const bNodeSocket & socket) const
overridevirtual

◆ update_or_build()

bNodeSocket & blender::nodes::decl::IDSocketDeclaration::update_or_build ( bNodeTree & ntree,
bNode & node,
bNodeSocket & socket ) const
overridevirtual

Member Data Documentation

◆ default_value_fn

std::function<ID *(const bNode &node)> blender::nodes::decl::IDSocketDeclaration::default_value_fn

Get the default ID pointer for this socket. This is a function to avoid dangling pointers, since bNode::id pointers are remapped as ID pointers change, but pointers in socket declarations are not managed the same way.

Definition at line 247 of file NOD_socket_declarations.hh.

Referenced by build().

◆ idname

const char* blender::nodes::decl::IDSocketDeclaration::idname

Definition at line 241 of file NOD_socket_declarations.hh.

Referenced by build().


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