Blender V4.3
blender::bke::bNodeTreeRuntime Class Reference

#include <BKE_node_runtime.hh>

Inherits blender::NonCopyable, and blender::NonMovable.

Public Attributes

uint32_t changed_flag = 0
 
uint32_t output_topology_hash = 0
 
uint8_t runtime_flag = 0
 
uint32_t previews_refresh_state = 0
 
std::unique_ptr< LoggedZoneGraphslogged_zone_graphs
 
NodeIDVectorSet nodes_by_id
 
bNodeTreeExecexecdata = nullptr
 
void(* progress )(void *, float progress) = nullptr
 
void(* stats_draw )(void *, const char *str) = nullptr
 
bool(* test_break )(void *) = nullptr
 
void(* update_draw )(void *) = nullptr
 
void * tbh = nullptr
 
void * prh = nullptr
 
void * sdh = nullptr
 
void * udh = nullptr
 
std::unique_ptr< nodes::FieldInferencingInterfacefield_inferencing_interface
 
std::unique_ptr< anonymous_attribute_inferencing::AnonymousAttributeInferencingResultanonymous_attribute_inferencing
 
std::unique_ptr< nodes::gizmos::TreeGizmoPropagationgizmo_propagation
 
std::mutex geometry_nodes_lazy_function_graph_info_mutex
 
std::unique_ptr< nodes::GeometryNodesLazyFunctionGraphInfogeometry_nodes_lazy_function_graph_info
 
MultiValueMap< int, NodeLinkErrorlink_errors_by_target_node
 
CacheMutex topology_cache_mutex
 
std::atomic< bool > topology_cache_exists = false
 
std::atomic< intallow_use_dirty_topology_cache = 0
 
CacheMutex tree_zones_cache_mutex
 
std::unique_ptr< bNodeTreeZonestree_zones
 
Set< const bNodeSocket * > sockets_on_active_gizmo_paths
 
Vector< bNodeLink * > links
 
Vector< bNodeSocket * > sockets
 
Vector< bNodeSocket * > input_sockets
 
Vector< bNodeSocket * > output_sockets
 
MultiValueMap< const bNodeType *, bNode * > nodes_by_type
 
Vector< bNode * > toposort_left_to_right
 
Vector< bNode * > toposort_right_to_left
 
Vector< bNode * > group_nodes
 
bool has_available_link_cycle = false
 
bool has_undefined_nodes_or_sockets = false
 
bNodegroup_output_node = nullptr
 
Vector< bNode * > root_frames
 

Detailed Description

Runtime data for bNodeTree from the perspective of execution instructions (rather than runtime data from evaluation of the node tree). Evaluation data is not the responsibility of the node tree and should be stored elsewhere. Evaluating a node tree should be possible without changing it.

Definition at line 101 of file BKE_node_runtime.hh.

Member Data Documentation

◆ allow_use_dirty_topology_cache

std::atomic<int> blender::bke::bNodeTreeRuntime::allow_use_dirty_topology_cache = 0
mutable

Under some circumstances, it can be useful to use the cached data while editing the bNodeTree. By default, this is protected against using an assert.

Definition at line 186 of file BKE_node_runtime.hh.

◆ anonymous_attribute_inferencing

std::unique_ptr<anonymous_attribute_inferencing::AnonymousAttributeInferencingResult> blender::bke::bNodeTreeRuntime::anonymous_attribute_inferencing

Information about usage of anonymous attributes within the group.

Definition at line 157 of file BKE_node_runtime.hh.

Referenced by blender::bke::ntree_copy_data().

◆ changed_flag

uint32_t blender::bke::bNodeTreeRuntime::changed_flag = 0

Keeps track of what changed in the node tree until the next update. Should not be changed directly, instead use the functions in BKE_node_tree_update.hh. eNodeTreeChangedFlag.

Definition at line 108 of file BKE_node_runtime.hh.

◆ execdata

bNodeTreeExec* blender::bke::bNodeTreeRuntime::execdata = nullptr

Legacy execution data.

Todo
Move this out of the node tree to improve semantic/physical separation between the node tree execution instructions and its evaluation.

Definition at line 143 of file BKE_node_runtime.hh.

◆ field_inferencing_interface

std::unique_ptr<nodes::FieldInferencingInterface> blender::bke::bNodeTreeRuntime::field_inferencing_interface

Information about how inputs and outputs of the node group interact with fields.

Definition at line 154 of file BKE_node_runtime.hh.

Referenced by blender::bke::ntree_copy_data().

◆ geometry_nodes_lazy_function_graph_info

std::unique_ptr<nodes::GeometryNodesLazyFunctionGraphInfo> blender::bke::bNodeTreeRuntime::geometry_nodes_lazy_function_graph_info

Definition at line 167 of file BKE_node_runtime.hh.

◆ geometry_nodes_lazy_function_graph_info_mutex

std::mutex blender::bke::bNodeTreeRuntime::geometry_nodes_lazy_function_graph_info_mutex

For geometry nodes, a lazy function graph with some additional info is cached. This is used to evaluate the node group. Caching it here allows us to reuse the preprocessed node tree in case its used multiple times.

Definition at line 165 of file BKE_node_runtime.hh.

◆ gizmo_propagation

std::unique_ptr<nodes::gizmos::TreeGizmoPropagation> blender::bke::bNodeTreeRuntime::gizmo_propagation

Definition at line 158 of file BKE_node_runtime.hh.

◆ group_nodes

Vector<bNode *> blender::bke::bNodeTreeRuntime::group_nodes

◆ group_output_node

bNode* blender::bke::bNodeTreeRuntime::group_output_node = nullptr

◆ has_available_link_cycle

bool blender::bke::bNodeTreeRuntime::has_available_link_cycle = false

Definition at line 206 of file BKE_node_runtime.hh.

◆ has_undefined_nodes_or_sockets

bool blender::bke::bNodeTreeRuntime::has_undefined_nodes_or_sockets = false

◆ input_sockets

◆ link_errors_by_target_node

MultiValueMap<int, NodeLinkError> blender::bke::bNodeTreeRuntime::link_errors_by_target_node

Stores information about invalid links. This information is then displayed to the user. The key of the map is the node identifier. The data is stored per target-node because we want to display the error information there.

Definition at line 174 of file BKE_node_runtime.hh.

◆ links

Vector<bNodeLink *> blender::bke::bNodeTreeRuntime::links

Only valid when #topology_cache_is_dirty is false.

Definition at line 198 of file BKE_node_runtime.hh.

Referenced by blender::bke::node_tree_runtime::update_directly_linked_links_and_sockets(), and blender::bke::node_tree_runtime::update_link_vector().

◆ logged_zone_graphs

std::unique_ptr<LoggedZoneGraphs> blender::bke::bNodeTreeRuntime::logged_zone_graphs

Allows logging zone graphs purely for debugging purposes.

Definition at line 128 of file BKE_node_runtime.hh.

◆ nodes_by_id

◆ nodes_by_type

MultiValueMap<const bNodeType *, bNode *> blender::bke::bNodeTreeRuntime::nodes_by_type

◆ output_sockets

Vector<bNodeSocket *> blender::bke::bNodeTreeRuntime::output_sockets

◆ output_topology_hash

uint32_t blender::bke::bNodeTreeRuntime::output_topology_hash = 0

A hash of the topology of the node tree leading up to the outputs. This is used to determine of the node tree changed in a way that requires updating geometry nodes or shaders.

Definition at line 113 of file BKE_node_runtime.hh.

◆ previews_refresh_state

uint32_t blender::bke::bNodeTreeRuntime::previews_refresh_state = 0

Contains a number increased for each node-tree update. Store a state variable in the #NestedTreePreviews structure to compare if they differ.

Definition at line 125 of file BKE_node_runtime.hh.

◆ prh

void * blender::bke::bNodeTreeRuntime::prh = nullptr

Definition at line 149 of file BKE_node_runtime.hh.

◆ progress

void(* blender::bke::bNodeTreeRuntime::progress) (void *, float progress) = nullptr

Definition at line 144 of file BKE_node_runtime.hh.

◆ root_frames

Vector<bNode *> blender::bke::bNodeTreeRuntime::root_frames

◆ runtime_flag

uint8_t blender::bke::bNodeTreeRuntime::runtime_flag = 0

Used to cache run-time information of the node tree. eNodeTreeRuntimeFlag.

Definition at line 119 of file BKE_node_runtime.hh.

◆ sdh

void * blender::bke::bNodeTreeRuntime::sdh = nullptr

Definition at line 149 of file BKE_node_runtime.hh.

◆ sockets

Vector<bNodeSocket *> blender::bke::bNodeTreeRuntime::sockets

◆ sockets_on_active_gizmo_paths

Set<const bNodeSocket *> blender::bke::bNodeTreeRuntime::sockets_on_active_gizmo_paths

The stored sockets are drawn using a special link to indicate that there is a gizmo. This is only valid during node editor drawing.

Definition at line 195 of file BKE_node_runtime.hh.

◆ stats_draw

void(* blender::bke::bNodeTreeRuntime::stats_draw) (void *, const char *str) = nullptr
Warning
may be called by different threads

Definition at line 146 of file BKE_node_runtime.hh.

◆ tbh

void* blender::bke::bNodeTreeRuntime::tbh = nullptr

Definition at line 149 of file BKE_node_runtime.hh.

◆ test_break

bool(* blender::bke::bNodeTreeRuntime::test_break) (void *) = nullptr

Definition at line 147 of file BKE_node_runtime.hh.

◆ topology_cache_exists

std::atomic<bool> blender::bke::bNodeTreeRuntime::topology_cache_exists = false

◆ topology_cache_mutex

CacheMutex blender::bke::bNodeTreeRuntime::topology_cache_mutex

Protects access to all topology cache variables below. This is necessary so that the cache can be updated on a const bNodeTree.

Definition at line 180 of file BKE_node_runtime.hh.

Referenced by blender::bke::node_tree_runtime::ensure_topology_cache().

◆ toposort_left_to_right

Vector<bNode *> blender::bke::bNodeTreeRuntime::toposort_left_to_right

Definition at line 203 of file BKE_node_runtime.hh.

◆ toposort_right_to_left

Vector<bNode *> blender::bke::bNodeTreeRuntime::toposort_right_to_left

◆ tree_zones

std::unique_ptr<bNodeTreeZones> blender::bke::bNodeTreeRuntime::tree_zones

Definition at line 189 of file BKE_node_runtime.hh.

◆ tree_zones_cache_mutex

CacheMutex blender::bke::bNodeTreeRuntime::tree_zones_cache_mutex

Definition at line 188 of file BKE_node_runtime.hh.

◆ udh

void * blender::bke::bNodeTreeRuntime::udh = nullptr

Definition at line 149 of file BKE_node_runtime.hh.

◆ update_draw

void(* blender::bke::bNodeTreeRuntime::update_draw) (void *) = nullptr

Definition at line 148 of file BKE_node_runtime.hh.


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