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_);
195 std::unique_ptr<nodes::GeometryNodesLazyFunctionGraphInfo>
417 tree_.runtime->allow_use_dirty_topology_cache.fetch_add(1);
422 tree_.runtime->allow_use_dirty_topology_cache.fetch_sub(1);
428 if (!
tree.runtime->topology_cache_exists) {
431 if (
tree.runtime->allow_use_dirty_topology_cache.load() > 0) {
434 if (
tree.runtime->topology_cache_mutex.is_dirty()) {
443 if (ntree ==
nullptr) {
452 if (node ==
nullptr) {
476 return this->
runtime->nodes_by_id.as_span();
481 return this->
runtime->nodes_by_id;
484inline bNode *bNodeTree::node_by_id(
const int32_t identifier)
487 bNode *
const *node = this->
runtime->nodes_by_id.lookup_key_ptr_as(identifier);
488 return node ? *node :
nullptr;
491inline const bNode *bNodeTree::node_by_id(
const int32_t identifier)
const
494 const bNode *
const *node = this->
runtime->nodes_by_id.lookup_key_ptr_as(identifier);
495 return node ? *node :
nullptr;
514 return this->
runtime->toposort_left_to_right;
520 return this->
runtime->toposort_right_to_left;
526 return this->
runtime->toposort_left_to_right;
532 return this->
runtime->toposort_right_to_left;
538 return this->
runtime->group_nodes;
544 return this->
runtime->group_nodes;
547inline bool bNodeTree::has_available_link_cycle()
const
550 return this->
runtime->has_available_link_cycle;
553inline bool bNodeTree::has_undefined_nodes_or_sockets()
const
556 return this->
runtime->has_undefined_nodes_or_sockets;
559inline bNode *bNodeTree::group_output_node()
562 return this->
runtime->group_output_node;
565inline const bNode *bNodeTree::group_output_node()
const
568 return this->
runtime->group_output_node;
573 return this->nodes_by_type(
"NodeGroupInput");
578 return this->nodes_by_type(
"NodeGroupInput");
584 return this->
runtime->input_sockets;
590 return this->
runtime->input_sockets;
596 return this->
runtime->output_sockets;
602 return this->
runtime->output_sockets;
620 return this->
runtime->root_frames;
645inline void bNodeTree::ensure_interface_cache()
const
689 return this->
tree_interface.runtime->inputs_.index_of_as(&io_socket);
695 return this->
tree_interface.runtime->outputs_.index_of_as(&io_socket);
701 return this->
tree_interface.runtime->items_.index_of_as(&io_item);
710inline int bNode::index()
const
712 const int index = this->
runtime->index_in_tree;
715 this->
runtime->owner_tree->runtime->nodes_by_id.index_of_as(
this->identifier));
746 const int num_inputs = this->
runtime->inputs.size();
747 if (num_inputs == 0) {
756 const int num_outputs = this->
runtime->outputs.size();
757 if (num_outputs == 0) {
766 const int num_inputs = this->
runtime->inputs.size();
767 if (num_inputs == 0) {
777 const int num_outputs = this->
runtime->outputs.size();
778 if (num_outputs == 0) {
788 return *this->
runtime->inputs[index];
794 return *this->
runtime->outputs[index];
797inline const bNodeSocket &bNode::input_socket(
int index)
const
800 return *this->
runtime->inputs[index];
803inline const bNodeSocket &bNode::output_socket(
int index)
const
806 return *this->
runtime->outputs[index];
833inline const bNodeTree &bNode::owner_tree()
const
836 return *this->
runtime->owner_tree;
842 return *this->
runtime->owner_tree;
847 if (this->
label[0] ==
'\0') {
853inline bool bNode::is_muted()
const
858inline bool bNode::is_reroute()
const
863inline bool bNode::is_frame()
const
868inline bool bNode::is_group()
const
873inline bool bNode::is_custom_group()
const
878inline bool bNode::is_group_input()
const
883inline bool bNode::is_group_output()
const
888inline bool bNode::is_undefined()
const
895 return this->
typeinfo->is_type(query_idname);
900 return this->
runtime->internal_links;
903inline bool bNode::is_dangling_reroute()
const
906 return this->
runtime->is_dangling_reroute;
913 return this->
runtime->direct_children_in_frame;
918 return this->
runtime->declaration;
937inline bool bNodeLink::is_muted()
const
942inline bool bNodeLink::is_available()
const
944 return this->
fromsock->is_available() && this->
tosock->is_available();
947inline bool bNodeLink::is_used()
const
949 return !this->is_muted() && this->is_available();
958inline int bNodeSocket::index()
const
961 return this->
runtime->index_in_node;
964inline int bNodeSocket::index_in_tree()
const
967 return this->
runtime->index_in_all_sockets;
970inline int bNodeSocket::index_in_all_inputs()
const
974 return this->
runtime->index_in_inout_sockets;
977inline int bNodeSocket::index_in_all_outputs()
const
981 return this->
runtime->index_in_inout_sockets;
984inline bool bNodeSocket::is_user_hidden()
const
989inline bool bNodeSocket::is_inactive()
const
994 return this->is_input() && !this->affects_node_output() &&
995 !this->owner_node().output_sockets().is_empty();
998inline bool bNodeSocket::is_available()
const
1003inline bool bNodeSocket::is_panel_collapsed()
const
1008inline bool bNodeSocket::is_visible()
const
1010 return !this->is_user_hidden() && this->is_available() &&
1011 (this->is_output() || this->inferred_input_socket_visibility());
1014inline bool bNodeSocket::is_icon_visible()
const
1016 return this->is_visible() &&
1017 (this->owner_node().flag &
NODE_HIDDEN || !this->is_panel_collapsed());
1020inline bNode &bNodeSocket::owner_node()
1023 return *this->
runtime->owner_node;
1026inline const bNodeTree &bNodeSocket::owner_tree()
const
1029 return *this->
runtime->owner_node->runtime->owner_tree;
1032inline bNodeTree &bNodeSocket::owner_tree()
1035 return *this->
runtime->owner_node->runtime->owner_tree;
1041 return this->
runtime->logically_linked_sockets;
1047 return this->
runtime->directly_linked_links;
1053 return this->
runtime->directly_linked_links;
1059 return this->
runtime->directly_linked_sockets;
1065 return this->
runtime->directly_linked_sockets;
1068inline bool bNodeSocket::is_directly_linked()
const
1070 return !this->directly_linked_links().is_empty();
1073inline bool bNodeSocket::is_logically_linked()
const
1075 return !this->logically_linked_sockets().is_empty();
1078inline const bNodeSocket *bNodeSocket::internal_link_input()
const
1082 return this->
runtime->internal_link_input;
1085template<
typename T>
T *bNodeSocket::default_value_typed()
1090template<
typename T>
const T *bNodeSocket::default_value_typed()
const
1095inline bool bNodeSocket::is_input()
const
1100inline bool bNodeSocket::is_output()
const
1105inline bool bNodeSocket::is_multi_input()
const
1110inline const bNode &bNodeSocket::owner_node()
const
1113 return *this->
runtime->owner_node;
1122inline bool bNodePanelState::is_collapsed()
const
1127inline bool bNodePanelState::is_parent_collapsed()
const
1132inline 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
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
Mutex geometry_nodes_lazy_function_graph_info_mutex
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
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
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
blender::Array< nodes::socket_usage_inference::SocketUsage > inferenced_input_socket_usage
std::unique_ptr< nodes::GeometryNodesEvalDependencies > geometry_nodes_eval_dependencies
std::shared_ptr< bNodeTreeZones > last_valid_zones
std::atomic< int > allow_use_dirty_topology_cache
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_)