Blender  V3.3
Public Member Functions | Protected Types | Protected Attributes | Friends | List of all members
blender::nodes::SocketDeclarationBuilder< SocketDecl > Class Template Reference

#include <NOD_node_declaration.hh>

Inheritance diagram for blender::nodes::SocketDeclarationBuilder< SocketDecl >:
blender::nodes::BaseSocketDeclarationBuilder

Public Member Functions

Selfhide_label (bool value=true)
 
Selfhide_value (bool value=true)
 
Selfmulti_input (bool value=true)
 
Selfdescription (std::string value="")
 
Selfno_muted_links (bool value=true)
 
Selfunavailable (bool value=true)
 
Selfis_attribute_name (bool value=true)
 
Selfis_default_link_socket (bool value=true)
 
Selfsupports_field ()
 
Selfimplicit_field ()
 
Selffield_source ()
 
Selfdependent_field ()
 
Selfdependent_field (Vector< int > input_dependencies)
 
Selfmake_available (std::function< void(bNode &)> fn)
 
- Public Member Functions inherited from blender::nodes::BaseSocketDeclarationBuilder
virtual ~BaseSocketDeclarationBuilder ()=default
 

Protected Types

using Self = typename SocketDecl::Builder
 

Protected Attributes

SocketDecl * decl_
 

Friends

class NodeDeclarationBuilder
 

Detailed Description

template<typename SocketDecl>
class blender::nodes::SocketDeclarationBuilder< SocketDecl >

Wraps a #SocketDeclaration and provides methods to set it up correctly. This is separate from #SocketDeclaration, because it allows separating the API used by nodes to declare themselves from how the declaration is stored internally.

Definition at line 143 of file NOD_node_declaration.hh.

Member Typedef Documentation

◆ Self

template<typename SocketDecl >
using blender::nodes::SocketDeclarationBuilder< SocketDecl >::Self = typename SocketDecl::Builder
protected

Definition at line 145 of file NOD_node_declaration.hh.

Member Function Documentation

◆ dependent_field() [1/2]

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::dependent_field ( )
inline

The output is a field if any of the inputs is a field.

Definition at line 227 of file NOD_node_declaration.hh.

References blender::nodes::SocketDeclarationBuilder< SocketDecl >::decl_, and blender::nodes::OutputFieldDependency::ForDependentField().

◆ dependent_field() [2/2]

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::dependent_field ( Vector< int >  input_dependencies)
inline

The output is a field if any of the inputs with indices in the given list is a field.

Definition at line 234 of file NOD_node_declaration.hh.

References blender::nodes::SocketDeclarationBuilder< SocketDecl >::decl_, and blender::nodes::OutputFieldDependency::ForPartiallyDependentField().

◆ description()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::description ( std::string  value = "")
inline

◆ field_source()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::field_source ( )
inline

The output is always a field, regardless of any inputs.

Definition at line 220 of file NOD_node_declaration.hh.

References blender::nodes::SocketDeclarationBuilder< SocketDecl >::decl_, and blender::nodes::OutputFieldDependency::ForFieldSource().

◆ hide_label()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::hide_label ( bool  value = true)
inline

◆ hide_value()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::hide_value ( bool  value = true)
inline

◆ implicit_field()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::implicit_field ( )
inline

The input supports a field and is a field by default when nothing is connected.

Definition at line 212 of file NOD_node_declaration.hh.

References blender::nodes::SocketDeclarationBuilder< SocketDecl >::hide_value(), and blender::nodes::Implicit.

◆ is_attribute_name()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::is_attribute_name ( bool  value = true)
inline

◆ is_default_link_socket()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::is_default_link_socket ( bool  value = true)
inline

◆ make_available()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::make_available ( std::function< void(bNode &)>  fn)
inline

Pass a function that sets properties on the node required to make the corresponding socket available, if it is not available on the default state of the node. The function is allowed to make other sockets unavailable, since it is meant to be called when the node is first added. The node type's update function is called afterwards.

Definition at line 247 of file NOD_node_declaration.hh.

References blender::nodes::SocketDeclarationBuilder< SocketDecl >::decl_.

◆ multi_input()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::multi_input ( bool  value = true)
inline

◆ no_muted_links()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::no_muted_links ( bool  value = true)
inline

◆ supports_field()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::supports_field ( )
inline

The input socket allows passing in a field.

Definition at line 205 of file NOD_node_declaration.hh.

References blender::nodes::SocketDeclarationBuilder< SocketDecl >::decl_, and blender::nodes::IsSupported.

◆ unavailable()

template<typename SocketDecl >
Self& blender::nodes::SocketDeclarationBuilder< SocketDecl >::unavailable ( bool  value = true)
inline

Used for sockets that are always unavailable and should not be seen by the user. Ideally, no new calls to this method should be added over time.

Definition at line 186 of file NOD_node_declaration.hh.

References blender::nodes::SocketDeclarationBuilder< SocketDecl >::decl_.

Friends And Related Function Documentation

◆ NodeDeclarationBuilder

template<typename SocketDecl >
friend class NodeDeclarationBuilder
friend

Definition at line 149 of file NOD_node_declaration.hh.

Member Data Documentation

◆ decl_

template<typename SocketDecl >
SocketDecl* blender::nodes::SocketDeclarationBuilder< SocketDecl >::decl_
protected

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