Blender
V3.3
|
#include <NOD_node_declaration.hh>
Public Member Functions | |
virtual | ~SocketDeclaration ()=default |
virtual bNodeSocket & | build (bNodeTree &ntree, bNode &node) const =0 |
virtual bool | matches (const bNodeSocket &socket) const =0 |
virtual bNodeSocket & | update_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 OutputFieldDependency & | output_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 |
Describes a single input or output socket. This is subclassed for different socket types.
Definition at line 71 of file NOD_node_declaration.hh.
|
virtualdefault |
|
pure virtual |
Implemented in blender::nodes::decl::Geometry, blender::nodes::decl::Shader, blender::nodes::decl::IDSocketDeclaration, blender::nodes::decl::String, blender::nodes::decl::Color, blender::nodes::decl::Bool, blender::nodes::decl::Vector, blender::nodes::decl::Int, and blender::nodes::decl::Float.
Referenced by update_or_build().
|
pure virtual |
Determine if a new socket described by this declaration could have a valid connection the other socket.
Implemented in blender::nodes::decl::Geometry, blender::nodes::decl::Shader, blender::nodes::decl::IDSocketDeclaration, blender::nodes::decl::String, blender::nodes::decl::Color, blender::nodes::decl::Bool, blender::nodes::decl::Vector, blender::nodes::decl::Int, and blender::nodes::decl::Float.
Referenced by blender::nodes::search_link_ops_for_declarations().
|
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().
|
inline |
Definition at line 396 of file NOD_node_declaration.hh.
References identifier_.
|
inline |
Definition at line 401 of file NOD_node_declaration.hh.
References in_out_.
Referenced by blender::ed::space_node::create_inspection_string_for_geometry(), and blender::nodes::decl::sockets_can_connect().
|
inline |
Definition at line 421 of file NOD_node_declaration.hh.
References input_field_type_.
Referenced by blender::modifiers::geometry_nodes::get_implicit_socket_input(), and blender::bke::node_field_inferencing::get_interface_input_field_type().
|
inline |
Definition at line 411 of file NOD_node_declaration.hh.
References is_attribute_name_.
|
inline |
Definition at line 416 of file NOD_node_declaration.hh.
References is_default_link_socket_.
Referenced by blender::ed::space_node::get_main_socket(), blender::nodes::search_link_ops_for_declarations(), and blender::nodes::node_shader_curves_cc::sh_node_curve_float_declare().
Change the node such that the socket will become visible. The node type's update method should be called afterwards.
Definition at line 431 of file NOD_node_declaration.hh.
References make_available_fn_, and node.
Referenced by blender::nodes::node_fn_rotate_euler_cc::fn_node_rotate_euler_declare(), blender::nodes::node_geo_curve_fillet_cc::node_declare(), blender::nodes::node_geo_curve_to_points_cc::node_declare(), blender::nodes::node_geo_distribute_points_on_faces_cc::node_declare(), blender::nodes::node_geo_points_to_volume_cc::node_declare(), blender::nodes::node_geo_string_to_curves_cc::node_declare(), blender::nodes::node_geo_transfer_attribute_cc::node_declare(), blender::nodes::node_geo_volume_to_mesh_cc::node_declare(), blender::nodes::search_link_ops_for_declarations(), blender::nodes::node_shader_tex_voronoi_cc::sh_node_tex_voronoi_declare(), and blender::nodes::node_shader_vector_rotate_cc::sh_node_vector_rotate_declare().
|
pure virtual |
Implemented in blender::nodes::decl::Geometry, blender::nodes::decl::Shader, blender::nodes::decl::IDSocketDeclaration, blender::nodes::decl::String, blender::nodes::decl::Color, blender::nodes::decl::Bool, blender::nodes::decl::Vector, blender::nodes::decl::Int, and blender::nodes::decl::Float.
Referenced by blender::nodes::NodeDeclaration::matches().
|
protected |
Definition at line 55 of file node_declaration.cc.
References compact_, bNodeSocket::flag, hide_label_, hide_value_, bNodeSocket::identifier, identifier_, is_multi_input_, is_unavailable_, bNodeSocket::name, name_, no_mute_links_, SOCK_COMPACT, SOCK_HIDE_LABEL, SOCK_HIDE_VALUE, SOCK_MULTI_INPUT, SOCK_NO_INTERNAL_LINK, and SOCK_UNAVAIL.
Referenced by blender::nodes::decl::Float::matches(), blender::nodes::decl::Int::matches(), blender::nodes::decl::Vector::matches(), blender::nodes::decl::Bool::matches(), blender::nodes::decl::Color::matches(), blender::nodes::decl::String::matches(), blender::nodes::decl::IDSocketDeclaration::matches(), blender::nodes::decl::Shader::matches(), and blender::nodes::decl::Geometry::matches().
|
inline |
Definition at line 391 of file NOD_node_declaration.hh.
References name_.
Referenced by blender::nodes::search_link_ops_for_declarations(), and blender::ed::space_node::ui_node_link_items().
|
inline |
Definition at line 426 of file NOD_node_declaration.hh.
References output_field_dependency_.
Referenced by blender::bke::node_field_inferencing::get_interface_output_field_dependency().
|
protected |
Definition at line 45 of file node_declaration.cc.
References compact_, bNodeSocket::flag, hide_label_, hide_value_, is_multi_input_, is_unavailable_, no_mute_links_, SET_FLAG_FROM_TEST, SOCK_COMPACT, SOCK_HIDE_LABEL, SOCK_HIDE_VALUE, SOCK_MULTI_INPUT, SOCK_NO_INTERNAL_LINK, and SOCK_UNAVAIL.
Referenced by blender::nodes::decl::Float::build(), blender::nodes::decl::Int::build(), blender::nodes::decl::Vector::build(), blender::nodes::decl::Bool::build(), blender::nodes::decl::Color::build(), blender::nodes::decl::String::build(), blender::nodes::decl::IDSocketDeclaration::build(), blender::nodes::decl::Shader::build(), blender::nodes::decl::Geometry::build(), blender::nodes::decl::Float::update_or_build(), blender::nodes::decl::Int::update_or_build(), blender::nodes::decl::Vector::update_or_build(), and blender::nodes::decl::IDSocketDeclaration::update_or_build().
|
virtual |
Reimplemented in blender::nodes::decl::IDSocketDeclaration, blender::nodes::decl::Vector, blender::nodes::decl::Int, and blender::nodes::decl::Float.
Definition at line 35 of file node_declaration.cc.
References BLI_assert, build(), bNodeSocket::in_out, in_out_, node, and UNUSED_VARS_NDEBUG.
|
friend |
Definition at line 95 of file NOD_node_declaration.hh.
|
protected |
Definition at line 81 of file NOD_node_declaration.hh.
Referenced by matches_common_data(), and set_common_flags().
|
protected |
Definition at line 75 of file NOD_node_declaration.hh.
Referenced by description().
|
protected |
Definition at line 79 of file NOD_node_declaration.hh.
Referenced by matches_common_data(), and set_common_flags().
|
protected |
Definition at line 80 of file NOD_node_declaration.hh.
Referenced by matches_common_data(), and set_common_flags().
|
protected |
Definition at line 74 of file NOD_node_declaration.hh.
Referenced by blender::nodes::decl::Float::build(), blender::nodes::decl::Int::build(), blender::nodes::decl::Vector::build(), blender::nodes::decl::Bool::build(), blender::nodes::decl::Color::build(), blender::nodes::decl::String::build(), blender::nodes::decl::IDSocketDeclaration::build(), blender::nodes::decl::Shader::build(), blender::nodes::decl::Geometry::build(), identifier(), blender::nodes::decl::Color::matches(), and matches_common_data().
|
protected |
Defined by whether the socket is part of the node's input or output socket declaration list. Included here for convenience.
Definition at line 78 of file NOD_node_declaration.hh.
Referenced by blender::nodes::decl::Float::build(), blender::nodes::decl::Int::build(), blender::nodes::decl::Vector::build(), blender::nodes::decl::Bool::build(), blender::nodes::decl::Color::build(), blender::nodes::decl::String::build(), blender::nodes::decl::IDSocketDeclaration::build(), blender::nodes::decl::Shader::build(), blender::nodes::decl::Geometry::build(), blender::nodes::decl::Shader::can_connect(), in_out(), update_or_build(), blender::nodes::decl::Float::update_or_build(), blender::nodes::decl::Int::update_or_build(), blender::nodes::decl::Vector::update_or_build(), and blender::nodes::decl::IDSocketDeclaration::update_or_build().
|
protected |
Definition at line 88 of file NOD_node_declaration.hh.
Referenced by input_field_type().
|
protected |
Definition at line 85 of file NOD_node_declaration.hh.
Referenced by is_attribute_name().
|
protected |
Definition at line 86 of file NOD_node_declaration.hh.
Referenced by is_default_link_socket().
|
protected |
Definition at line 82 of file NOD_node_declaration.hh.
Referenced by matches_common_data(), and set_common_flags().
|
protected |
Definition at line 84 of file NOD_node_declaration.hh.
Referenced by matches_common_data(), and set_common_flags().
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().
|
protected |
Definition at line 73 of file NOD_node_declaration.hh.
Referenced by blender::nodes::decl::Float::build(), blender::nodes::decl::Int::build(), blender::nodes::decl::Vector::build(), blender::nodes::decl::Bool::build(), blender::nodes::decl::Color::build(), blender::nodes::decl::String::build(), blender::nodes::decl::IDSocketDeclaration::build(), blender::nodes::decl::Shader::build(), blender::nodes::decl::Geometry::build(), blender::nodes::decl::Color::matches(), matches_common_data(), name(), and blender::nodes::decl::Vector::update_or_build().
|
protected |
Definition at line 83 of file NOD_node_declaration.hh.
Referenced by matches_common_data(), and set_common_flags().
|
protected |
Definition at line 94 of file NOD_node_declaration.hh.
|
protected |
Definition at line 89 of file NOD_node_declaration.hh.
Referenced by output_field_dependency().