Blender V5.0
blender::nodes::NodeDeclaration Class Reference

#include <NOD_node_declaration.hh>

Public Member Functions

void assert_valid () const
bool matches (const bNode &node) const
Span< SocketDeclaration * > sockets (eNodeSocketInOut in_out) const
const aal::RelationsInNode * anonymous_attribute_relations () const

Public Attributes

Vector< ItemDeclarationPtrall_items
Vector< ItemDeclaration * > root_items
Vector< SocketDeclaration * > inputs
Vector< SocketDeclaration * > outputs
Vector< PanelDeclaration * > panels
std::unique_ptr< aal::RelationsInNode > anonymous_attribute_relations_
bool skip_updating_sockets = false
bool use_custom_socket_order = false
bool allow_any_socket_order = false
bool is_context_dependent = false
friend NodeDeclarationBuilder

Detailed Description

Definition at line 618 of file NOD_node_declaration.hh.

Member Function Documentation

◆ anonymous_attribute_relations()

const aal::RelationsInNode * blender::nodes::NodeDeclaration::anonymous_attribute_relations ( ) const
inline

◆ assert_valid()

void blender::nodes::NodeDeclaration::assert_valid ( ) const

Asserts that the declaration is considered valid.

Definition at line 207 of file node_declaration.cc.

References blender::nodes::assert_valid_panels_recursive(), BLI_assert, inputs, outputs, root_items, and use_custom_socket_order.

◆ matches()

bool blender::nodes::NodeDeclaration::matches ( const bNode & node) const

◆ sockets()

Span< SocketDeclaration * > blender::nodes::NodeDeclaration::sockets ( eNodeSocketInOut in_out) const

Definition at line 139 of file node_declaration.cc.

References inputs, outputs, and SOCK_IN.

Referenced by blender::nodes::search_link_ops_for_basic_node().

Member Data Documentation

◆ all_items

Vector<ItemDeclarationPtr> blender::nodes::NodeDeclaration::all_items

Contains all items including recursive children.

Definition at line 621 of file NOD_node_declaration.hh.

Referenced by blender::nodes::DeclarationListBuilder::add_socket(), matches(), and blender::nodes::refresh_node_sockets_and_panels().

◆ allow_any_socket_order

bool blender::nodes::NodeDeclaration::allow_any_socket_order = false

Usually output sockets come before input sockets currently. Only some specific nodes are exempt from that rule for now.

Definition at line 641 of file NOD_node_declaration.hh.

Referenced by blender::nodes::assert_valid_panels_recursive().

◆ anonymous_attribute_relations_

std::unique_ptr<aal::RelationsInNode> blender::nodes::NodeDeclaration::anonymous_attribute_relations_

Definition at line 628 of file NOD_node_declaration.hh.

Referenced by anonymous_attribute_relations().

◆ inputs

Vector<SocketDeclaration *> blender::nodes::NodeDeclaration::inputs

All input and output socket declarations.

Definition at line 625 of file NOD_node_declaration.hh.

Referenced by blender::nodes::DeclarationListBuilder::add_socket(), assert_valid(), blender::nodes::do_forward_compat_versioning(), blender::bke::node_field_inferencing::get_interface_input_field_type(), blender::ed::space_node::get_main_socket(), blender::nodes::node_fn_random_value_cc::node_gather_link_search_ops(), blender::nodes::node_geo_accumulate_field_cc::node_gather_link_searches(), blender::nodes::node_geo_attribute_statistic_cc::node_gather_link_searches(), blender::nodes::node_geo_blur_attribute_cc::node_gather_link_searches(), blender::nodes::node_geo_curve_sample_cc::node_gather_link_searches(), blender::nodes::node_geo_curve_trim_cc::node_gather_link_searches(), blender::nodes::node_geo_field_average_cc::node_gather_link_searches(), blender::nodes::node_geo_field_min_and_max_cc::node_gather_link_searches(), blender::nodes::node_geo_field_variance_cc::node_gather_link_searches(), blender::nodes::node_geo_input_named_attribute_cc::node_gather_link_searches(), blender::nodes::node_geo_raycast_cc::node_gather_link_searches(), blender::nodes::node_geo_sample_index_cc::node_gather_link_searches(), blender::nodes::node_geo_sample_nearest_surface_cc::node_gather_link_searches(), blender::nodes::node_geo_sample_uv_surface_cc::node_gather_link_searches(), blender::nodes::node_geo_store_named_attribute_cc::node_gather_link_searches(), blender::nodes::node_group_declare(), and sockets().

◆ is_context_dependent

bool blender::nodes::NodeDeclaration::is_context_dependent = false

True if any context was used to build this declaration.

Definition at line 646 of file NOD_node_declaration.hh.

◆ NodeDeclarationBuilder

friend blender::nodes::NodeDeclaration::NodeDeclarationBuilder

Definition at line 648 of file NOD_node_declaration.hh.

◆ outputs

◆ panels

Vector<PanelDeclaration *> blender::nodes::NodeDeclaration::panels

◆ root_items

◆ skip_updating_sockets

bool blender::nodes::NodeDeclaration::skip_updating_sockets = false

Leave the sockets in place, even if they don't match the declaration. Used for dynamic declarations when the information used to build the declaration is missing, but might become available again in the future.

Definition at line 633 of file NOD_node_declaration.hh.

Referenced by blender::nodes::node_group_declare(), blender::nodes::refresh_node(), blender::ed::space_node::socket_needs_attribute_search(), blender::ed::space_node::socket_needs_layer_search(), and blender::ed::space_node::socket_needs_volume_grid_search().

◆ use_custom_socket_order

bool blender::nodes::NodeDeclaration::use_custom_socket_order = false

Use order of socket declarations for socket order instead of conventional outputs | buttons | inputs order. Panels are only supported when using custom socket order.

Definition at line 637 of file NOD_node_declaration.hh.

Referenced by assert_valid(), and blender::nodes::node_group_declare().


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