Blender  V3.3
Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
blender::nodes::SocketDeclaration Class Referenceabstract

#include <NOD_node_declaration.hh>

Inheritance diagram for blender::nodes::SocketDeclaration:
blender::nodes::decl::Bool blender::nodes::decl::Color blender::nodes::decl::Float blender::nodes::decl::Geometry blender::nodes::decl::IDSocketDeclaration blender::nodes::decl::Int blender::nodes::decl::Shader blender::nodes::decl::String 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
 
#SocketDeclaration Inline Methods
void make_available (bNode &node) const
 
StringRefNull name () const
 
StringRefNull description () const
 
StringRefNull identifier () const
 
eNodeSocketInOut in_out () const
 
bool is_attribute_name () const
 
bool is_default_link_socket () const
 
InputSocketFieldType input_field_type () const
 
const OutputFieldDependencyoutput_field_dependency () const
 

Protected Member Functions

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

Protected Attributes

std::string name_
 
std::string identifier_
 
std::string description_
 
eNodeSocketInOut in_out_
 
bool hide_label_ = false
 
bool hide_value_ = false
 
bool compact_ = false
 
bool is_multi_input_ = false
 
bool no_mute_links_ = false
 
bool is_unavailable_ = false
 
bool is_attribute_name_ = false
 
bool is_default_link_socket_ = false
 
InputSocketFieldType input_field_type_ = InputSocketFieldType::None
 
OutputFieldDependency output_field_dependency_
 
std::function< void(bNode &)> make_available_fn_
 
friend NodeDeclarationBuilder
 

Friends

template<typename SocketDecl >
class SocketDeclarationBuilder
 

Detailed Description

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

Definition at line 71 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

◆ description()

StringRefNull blender::nodes::SocketDeclaration::description ( ) const
inline

Definition at line 406 of file NOD_node_declaration.hh.

References description_.

Referenced by blender::nodes::node_geo_accumulate_field_cc::node_declare(), blender::nodes::node_geo_curve_endpoint_selection_cc::node_declare(), blender::nodes::node_geo_curve_primitive_arc_cc::node_declare(), blender::nodes::node_geo_curve_primitive_bezier_segment_cc::node_declare(), blender::nodes::node_geo_curve_primitive_circle_cc::node_declare(), blender::nodes::node_geo_curve_primitive_line_cc::node_declare(), blender::nodes::node_geo_curve_primitive_quadratic_bezier_cc::node_declare(), blender::nodes::node_geo_curve_primitive_quadrilateral_cc::node_declare(), blender::nodes::node_geo_curve_primitive_spiral_cc::node_declare(), blender::nodes::node_geo_curve_primitive_star_cc::node_declare(), blender::nodes::node_geo_curve_spline_parameter_cc::node_declare(), blender::nodes::node_geo_curve_subdivide_cc::node_declare(), blender::nodes::node_geo_delete_geometry_cc::node_declare(), blender::nodes::node_geo_dual_mesh_cc::node_declare(), blender::nodes::node_geo_duplicate_elements_cc::node_declare(), blender::nodes::node_geo_image_texture_cc::node_declare(), blender::nodes::node_geo_input_curve_handles_cc::node_declare(), blender::nodes::node_geo_input_id_cc::node_declare(), blender::nodes::node_geo_input_mesh_edge_angle_cc::node_declare(), blender::nodes::node_geo_input_mesh_edge_neighbors_cc::node_declare(), blender::nodes::node_geo_input_mesh_edge_vertices_cc::node_declare(), blender::nodes::node_geo_input_mesh_face_area_cc::node_declare(), blender::nodes::node_geo_input_mesh_face_is_planar_cc::node_declare(), blender::nodes::node_geo_input_mesh_face_neighbors_cc::node_declare(), blender::nodes::node_geo_input_mesh_island_cc::node_declare(), blender::nodes::node_geo_input_mesh_vertex_neighbors_cc::node_declare(), blender::nodes::node_geo_instance_on_points_cc::node_declare(), blender::nodes::node_geo_mesh_primitive_circle_cc::node_declare(), blender::nodes::node_geo_mesh_primitive_cone_cc::node_declare(), blender::nodes::node_geo_mesh_primitive_cube_cc::node_declare(), blender::nodes::node_geo_mesh_primitive_cylinder_cc::node_declare(), blender::nodes::node_geo_mesh_primitive_grid_cc::node_declare(), blender::nodes::node_geo_mesh_primitive_ico_sphere_cc::node_declare(), blender::nodes::node_geo_mesh_primitive_line_cc::node_declare(), blender::nodes::node_geo_mesh_primitive_uv_sphere_cc::node_declare(), blender::nodes::node_geo_mesh_to_volume_cc::node_declare(), blender::nodes::node_geo_points_cc::node_declare(), blender::nodes::node_geo_scale_elements_cc::node_declare(), blender::nodes::node_geo_separate_geometry_cc::node_declare(), blender::nodes::node_geo_uv_pack_islands_cc::node_declare(), blender::nodes::node_geo_uv_unwrap_cc::node_declare(), blender::nodes::node_geo_volume_to_mesh_cc::node_declare(), blender::ed::space_node::node_socket_get_tooltip(), and blender::ed::space_node::node_socket_has_tooltip().

◆ identifier()

StringRefNull blender::nodes::SocketDeclaration::identifier ( ) const
inline

Definition at line 396 of file NOD_node_declaration.hh.

References identifier_.

◆ in_out()

eNodeSocketInOut blender::nodes::SocketDeclaration::in_out ( ) const
inline

◆ input_field_type()

InputSocketFieldType blender::nodes::SocketDeclaration::input_field_type ( ) const
inline

◆ is_attribute_name()

bool blender::nodes::SocketDeclaration::is_attribute_name ( ) const
inline

Definition at line 411 of file NOD_node_declaration.hh.

References is_attribute_name_.

◆ is_default_link_socket()

bool blender::nodes::SocketDeclaration::is_default_link_socket ( ) const
inline

◆ make_available()

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

◆ 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

◆ name()

StringRefNull blender::nodes::SocketDeclaration::name ( ) const
inline

◆ output_field_dependency()

const OutputFieldDependency & blender::nodes::SocketDeclaration::output_field_dependency ( ) const
inline

◆ set_common_flags()

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

◆ update_or_build()

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

Friends And Related Function Documentation

◆ SocketDeclarationBuilder

template<typename SocketDecl >
friend class SocketDeclarationBuilder
friend

Definition at line 95 of file NOD_node_declaration.hh.

Member Data Documentation

◆ compact_

bool blender::nodes::SocketDeclaration::compact_ = false
protected

Definition at line 81 of file NOD_node_declaration.hh.

Referenced by matches_common_data(), and set_common_flags().

◆ description_

std::string blender::nodes::SocketDeclaration::description_
protected

Definition at line 75 of file NOD_node_declaration.hh.

Referenced by description().

◆ hide_label_

bool blender::nodes::SocketDeclaration::hide_label_ = false
protected

Definition at line 79 of file NOD_node_declaration.hh.

Referenced by matches_common_data(), and set_common_flags().

◆ hide_value_

bool blender::nodes::SocketDeclaration::hide_value_ = false
protected

Definition at line 80 of file NOD_node_declaration.hh.

Referenced by matches_common_data(), and set_common_flags().

◆ identifier_

std::string blender::nodes::SocketDeclaration::identifier_
protected

◆ in_out_

eNodeSocketInOut blender::nodes::SocketDeclaration::in_out_
protected

◆ input_field_type_

InputSocketFieldType blender::nodes::SocketDeclaration::input_field_type_ = InputSocketFieldType::None
protected

Definition at line 88 of file NOD_node_declaration.hh.

Referenced by input_field_type().

◆ is_attribute_name_

bool blender::nodes::SocketDeclaration::is_attribute_name_ = false
protected

Definition at line 85 of file NOD_node_declaration.hh.

Referenced by is_attribute_name().

◆ is_default_link_socket_

bool blender::nodes::SocketDeclaration::is_default_link_socket_ = false
protected

Definition at line 86 of file NOD_node_declaration.hh.

Referenced by is_default_link_socket().

◆ is_multi_input_

bool blender::nodes::SocketDeclaration::is_multi_input_ = false
protected

Definition at line 82 of file NOD_node_declaration.hh.

Referenced by matches_common_data(), and set_common_flags().

◆ is_unavailable_

bool blender::nodes::SocketDeclaration::is_unavailable_ = false
protected

Definition at line 84 of file NOD_node_declaration.hh.

Referenced by matches_common_data(), and set_common_flags().

◆ make_available_fn_

std::function<void(bNode &)> blender::nodes::SocketDeclaration::make_available_fn_
protected

Utility method to make the socket available if there is a straightforward way to do so.

Definition at line 92 of file NOD_node_declaration.hh.

Referenced by make_available().

◆ name_

std::string blender::nodes::SocketDeclaration::name_
protected

◆ no_mute_links_

bool blender::nodes::SocketDeclaration::no_mute_links_ = false
protected

Definition at line 83 of file NOD_node_declaration.hh.

Referenced by matches_common_data(), and set_common_flags().

◆ NodeDeclarationBuilder

friend blender::nodes::SocketDeclaration::NodeDeclarationBuilder
protected

Definition at line 94 of file NOD_node_declaration.hh.

◆ output_field_dependency_

OutputFieldDependency blender::nodes::SocketDeclaration::output_field_dependency_
protected

Definition at line 89 of file NOD_node_declaration.hh.

Referenced by output_field_dependency().


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