83 int input_socket_index_;
84 int input_link_index_;
95 return get_default_hash(this->to_node_id_, this->input_socket_index_, this->input_link_index_);
194 std::unique_ptr<nodes::GeometryNodesLazyFunctionGraphInfo>
436 tree_.runtime->allow_use_dirty_topology_cache.fetch_add(1);
441 tree_.runtime->allow_use_dirty_topology_cache.fetch_sub(1);
451 if (!
tree.runtime->topology_cache_exists) {
454 if (
tree.runtime->allow_use_dirty_topology_cache.load() > 0) {
457 if (
tree.runtime->topology_cache_mutex.is_dirty()) {
466 if (ntree ==
nullptr) {
475 if (node ==
nullptr) {
499 return this->
runtime->nodes_by_id.as_span();
504 return this->
runtime->nodes_by_id;
507inline bNode *bNodeTree::node_by_id(
const int32_t identifier)
510 bNode *
const *node = this->
runtime->nodes_by_id.lookup_key_ptr_as(identifier);
511 return node ? *node :
nullptr;
514inline const bNode *bNodeTree::node_by_id(
const int32_t identifier)
const
517 const bNode *
const *node = this->
runtime->nodes_by_id.lookup_key_ptr_as(identifier);
518 return node ? *node :
nullptr;
537 return this->
runtime->toposort_left_to_right;
543 return this->
runtime->toposort_right_to_left;
549 return this->
runtime->toposort_left_to_right;
555 return this->
runtime->toposort_right_to_left;
561 return this->
runtime->group_nodes;
567 return this->
runtime->group_nodes;
570inline bool bNodeTree::has_available_link_cycle()
const
573 return this->
runtime->has_available_link_cycle;
576inline bool bNodeTree::has_undefined_nodes_or_sockets()
const
579 return this->
runtime->has_undefined_nodes_or_sockets;
582inline bNode *bNodeTree::group_output_node()
585 return this->
runtime->group_output_node;
588inline const bNode *bNodeTree::group_output_node()
const
591 return this->
runtime->group_output_node;
596 return this->nodes_by_type(
"NodeGroupInput");
601 return this->nodes_by_type(
"NodeGroupInput");
607 return this->
runtime->input_sockets;
613 return this->
runtime->input_sockets;
619 return this->
runtime->output_sockets;
625 return this->
runtime->output_sockets;
643 return this->
runtime->root_frames;
668inline void bNodeTree::ensure_interface_cache()
const
712 return this->
tree_interface.runtime->inputs_.index_of_as(&io_socket);
718 return this->
tree_interface.runtime->outputs_.index_of_as(&io_socket);
724 return this->
tree_interface.runtime->items_.index_of_as(&io_item);
733inline int bNode::index()
const
735 const int index = this->
runtime->index_in_tree;
738 this->
runtime->owner_tree->runtime->nodes_by_id.index_of_as(this->identifier));
769 const int num_inputs = this->
runtime->inputs.size();
770 if (num_inputs == 0) {
779 const int num_outputs = this->
runtime->outputs.size();
780 if (num_outputs == 0) {
789 const int num_inputs = this->
runtime->inputs.size();
790 if (num_inputs == 0) {
800 const int num_outputs = this->
runtime->outputs.size();
801 if (num_outputs == 0) {
811 return *this->
runtime->inputs[index];
817 return *this->
runtime->outputs[index];
820inline const bNodeSocket &bNode::input_socket(
int index)
const
823 return *this->
runtime->inputs[index];
826inline const bNodeSocket &bNode::output_socket(
int index)
const
829 return *this->
runtime->outputs[index];
835 return this->
runtime->inputs_by_identifier.lookup_default_as(
identifier,
nullptr);
841 return this->
runtime->outputs_by_identifier.lookup_default_as(
identifier,
nullptr);
847 return this->
runtime->inputs_by_identifier.lookup_default_as(
identifier,
nullptr);
853 return this->
runtime->outputs_by_identifier.lookup_default_as(
identifier,
nullptr);
856inline const bNodeTree &bNode::owner_tree()
const
859 return *this->
runtime->owner_tree;
865 return *this->
runtime->owner_tree;
870 if (this->
label[0] ==
'\0') {
876inline bool bNode::is_muted()
const
881inline bool bNode::is_reroute()
const
886inline bool bNode::is_frame()
const
891inline bool bNode::is_group()
const
896inline bool bNode::is_custom_group()
const
901inline bool bNode::is_group_input()
const
906inline bool bNode::is_group_output()
const
911inline bool bNode::is_undefined()
const
918 return this->
typeinfo->is_type(query_idname);
923 return this->
runtime->internal_links;
926inline bool bNode::is_dangling_reroute()
const
929 return this->
runtime->is_dangling_reroute;
936 return this->
runtime->direct_children_in_frame;
941 return this->
runtime->declaration;
960inline bool bNodeLink::is_muted()
const
965inline bool bNodeLink::is_available()
const
967 return this->
fromsock->is_available() && this->
tosock->is_available();
970inline bool bNodeLink::is_used()
const
972 return !this->is_muted() && this->is_available();
981inline int bNodeSocket::index()
const
984 return this->
runtime->index_in_node;
987inline int bNodeSocket::index_in_tree()
const
990 return this->
runtime->index_in_all_sockets;
993inline int bNodeSocket::index_in_all_inputs()
const
997 return this->
runtime->index_in_inout_sockets;
1000inline int bNodeSocket::index_in_all_outputs()
const
1004 return this->
runtime->index_in_inout_sockets;
1007inline bool bNodeSocket::is_user_hidden()
const
1012inline bool bNodeSocket::is_inactive()
const
1017 return this->is_input() && !this->affects_node_output() &&
1018 !this->owner_node().output_sockets().is_empty();
1021inline bool bNodeSocket::is_available()
const
1026inline bool bNodeSocket::is_panel_collapsed()
const
1031inline bool bNodeSocket::is_visible()
const
1033 return !this->is_user_hidden() && this->is_available() && this->inferred_socket_visibility();
1036inline bool bNodeSocket::is_icon_visible()
const
1038 return this->is_visible() &&
1039 (this->owner_node().flag &
NODE_COLLAPSED || !this->is_panel_collapsed());
1042inline bool bNodeSocket::may_be_field()
const
1044 return ELEM(this->
runtime->inferred_structure_type,
1045 blender::nodes::StructureType::Field,
1046 blender::nodes::StructureType::Dynamic);
1049inline bNode &bNodeSocket::owner_node()
1052 return *this->
runtime->owner_node;
1055inline const bNodeTree &bNodeSocket::owner_tree()
const
1058 return *this->
runtime->owner_node->runtime->owner_tree;
1061inline bNodeTree &bNodeSocket::owner_tree()
1064 return *this->
runtime->owner_node->runtime->owner_tree;
1070 return this->
runtime->logically_linked_sockets;
1076 return this->
runtime->directly_linked_links;
1082 return this->
runtime->directly_linked_links;
1088 return this->
runtime->directly_linked_sockets;
1094 return this->
runtime->directly_linked_sockets;
1097inline bool bNodeSocket::is_directly_linked()
const
1099 return !this->directly_linked_links().is_empty();
1102inline bool bNodeSocket::is_logically_linked()
const
1104 return !this->logically_linked_sockets().is_empty();
1107inline const bNodeSocket *bNodeSocket::internal_link_input()
const
1111 return this->
runtime->internal_link_input;
1114template<
typename T>
T *bNodeSocket::default_value_typed()
1119template<
typename T>
const T *bNodeSocket::default_value_typed()
const
1124inline bool bNodeSocket::is_input()
const
1129inline bool bNodeSocket::is_output()
const
1134inline bool bNodeSocket::is_multi_input()
const
1139inline const bNode &bNodeSocket::owner_node()
const
1142 return *this->
runtime->owner_node;
1151inline bool bNodePanelState::is_collapsed()
const
1156inline bool bNodePanelState::is_parent_collapsed()
const
1161inline bool bNodePanelState::has_visible_content()
const
#define NODE_CUSTOM_GROUP
#define NODE_GROUP_OUTPUT
@ NODE_PANEL_PARENT_COLLAPSED
@ NODE_PANEL_CONTENT_VISIBLE
unsigned long long int uint64_t
static constexpr IndexRange from_begin_size(const int64_t begin, const int64_t size)
NonCopyable(const NonCopyable &other)=delete
NonMovable(NonMovable &&other)=delete
constexpr const char * c_str() const
bNodeSocket * input_socket
std::optional< float > header_center_y
std::optional< bNodePanelExtent > content_extent
bool has_available_linked_inputs
Array< bNodePanelRuntime > panels
Map< StringRefNull, bNodeSocket * > outputs_by_identifier
bool forward_compatible_versioning_done
Vector< bNode * > direct_children_in_frame
Vector< bNodeSocket * > outputs
Map< StringRefNull, bNodeSocket * > inputs_by_identifier
int toposort_left_to_right_index
Vector< bNodeSocket * > inputs
int toposort_right_to_left_index
bool has_available_linked_outputs
nodes::NodeDeclaration * declaration
Vector< bNodeLink > internal_links
Vector< bNodeSocket * > logically_linked_skipped_sockets
Vector< bNodeSocket * > directly_linked_sockets
Vector< bNodeSocket * > logically_linked_sockets
int index_in_inout_sockets
bNodeSocket * internal_link_input
Vector< bNodeLink * > directly_linked_links
nodes::StructureType inferred_structure_type
const nodes::SocketDeclaration * declaration
MultiValueMap< NodeLinkKey, NodeLinkError > link_errors
uint32_t output_topology_hash
std::unique_ptr< LoggedZoneGraphs > logged_zone_graphs
void(* stats_draw)(void *, const char *str)
Vector< bNode * > root_frames
Vector< bNodeSocket * > output_sockets
std::unique_ptr< node_tree_reference_lifetimes::ReferenceLifetimesInfo > reference_lifetimes_info
Vector< bNode * > toposort_right_to_left
Vector< bNode * > group_nodes
Array< FieldSocketState > field_states
bNode * group_output_node
Vector< bNodeSocket * > sockets
uint32_t previews_refresh_state
CacheMutex topology_cache_mutex
bool has_undefined_nodes_or_sockets
void(* update_draw)(void *)
CacheMutex tree_zones_cache_mutex
bool has_available_link_cycle
CacheMutex geometry_nodes_lazy_function_graph_info_mutex
Vector< bNodeLink * > links
std::unique_ptr< nodes::StructureTypeInterface > structure_type_interface
std::unique_ptr< nodes::gizmos::TreeGizmoPropagation > gizmo_propagation
Set< const bNodeSocket * > sockets_on_active_gizmo_paths
std::unique_ptr< nodes::GeometryNodesLazyFunctionGraphInfo > geometry_nodes_lazy_function_graph_info
CacheMutex inferenced_input_socket_usage_mutex
Map< bNodeInstanceKey, bNodePreview > previews
Map< int32_t, VectorSet< std::string > > shader_node_errors
std::atomic< bool > topology_cache_exists
Set< int > invalid_zone_output_node_ids
MultiValueMap< const bNodeType *, bNode * > nodes_by_type
bool(* test_break)(void *)
std::shared_ptr< bNodeTreeZones > tree_zones
void(* progress)(void *, float progress)
NodeIDVectorSet nodes_by_id
std::unique_ptr< nodes::FieldInferencingInterface > field_inferencing_interface
std::unique_ptr< nodes::GeometryNodesEvalDependencies > geometry_nodes_eval_dependencies
std::shared_ptr< bNodeTreeZones > last_valid_zones
blender::Array< nodes::socket_usage_inference::SocketUsage > inferenced_socket_usage
std::atomic< int > allow_use_dirty_topology_cache
Mutex shader_node_errors_mutex
Vector< bNode * > toposort_left_to_right
Vector< bNodeSocket * > input_sockets
AllowUsingOutdatedInfo(const bNodeTree &tree)
~AllowUsingOutdatedInfo()
bool update_field_inferencing(const bNodeTree &tree)
bool update_structure_type_interface(bNodeTree &tree)
bool topology_cache_is_available(const bNodeTree &tree)
void preprocess_geometry_node_tree_for_evaluation(bNodeTree &tree_cow)
CustomIDVectorSet< bNode *, NodeIDGetter > NodeIDVectorSet
bNodeType NodeTypeUndefined
bNodeType * node_type_find(StringRef idname)
uint64_t get_default_hash(const T &v, const Args &...args)
VecBase< float, 2 > float2
VectorSet< T, InlineBufferCapacity, DefaultProbingStrategy, CustomIDHash< T, GetIDFn >, CustomIDEqual< T, GetIDFn > > CustomIDVectorSet
bNodeSocketRuntimeHandle * runtime
bNodeTreeRuntimeHandle * runtime
bNestedNodeRef * nested_node_refs
bNodeTreeInterface tree_interface
bNodeTypeHandle * typeinfo
bNodePanelState * panel_states_array
bNodeRuntimeHandle * runtime
Map< int, std::string > graph_by_zone_id
int32_t operator()(const bNode *value) const
bNodeLink * try_find(bNodeTree &ntree) const
NodeLinkKey(const bNodeLink &link)
BLI_STRUCT_EQUALITY_OPERATORS_3(NodeLinkKey, to_node_id_, input_socket_index_, input_link_index_)