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

#include <BKE_node_runtime.hh>

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

Public Attributes

uint32_t changed_flag = 0
uint32_t output_topology_hash = 0
uint8_t runtime_flag = 0
bool is_updating = false
uint32_t previews_refresh_state = 0
std::unique_ptr< LoggedZoneGraphs > logged_zone_graphs
NodeIDVectorSet nodes_by_id
bNodeTreeExec * execdata = nullptr
std::shared_ptr< nodes::GeneratedTreeSrnaData > geometry_nodes_srna_data
std::shared_ptr< nodes::GeneratedTreeSrnaData > compositor_nodes_srna_data
std::shared_ptr< nodes::GeneratedTreeSrnaData > compositor_effect_nodes_srna_data
std::shared_ptr< nodes::GeneratedTreeSrnaData > scene_compositor_effect_srna_data
std::unique_ptr< node_tree_reference_lifetimes::ReferenceLifetimesInfo > reference_lifetimes_info
std::unique_ptr< nodes::gizmos::TreeGizmoPropagation > gizmo_propagation
std::unique_ptr< nodes::StructureTypeInterface > structure_type_interface
Array< nodes::socket_usage_inference::SocketUsage > inferenced_socket_usage
CacheMutex inferenced_input_socket_usage_mutex
CacheMutex geometry_nodes_lazy_function_graph_info_mutex
std::shared_ptr< const nodes::GeometryNodesLazyFunctionGraphInfo > geometry_nodes_lazy_function_graph_info
const nodes::GeometryNodesLazyFunctionGraphInfo * self_geometry_nodes_lazy_function_graph_info
MultiValueMap< NodeLinkKey, NodeLinkError > link_errors
Map< int32_t, VectorSet< nodes::NodeWarning > > shader_node_errors
Mutex shader_node_errors_mutex
CacheMutex topology_cache_mutex
std::atomic< bool > topology_cache_exists = false
std::atomic< int > allow_use_dirty_topology_cache = 0
CacheMutex tree_zones_cache_mutex
std::shared_ptr< bNodeTreeZones > tree_zones
std::shared_ptr< bNodeTreeZones > last_valid_zones
Set< int > invalid_zone_output_node_ids
Set< const bNodeSocket * > sockets_on_active_gizmo_paths
std::unique_ptr< nodes::EvalDependencies > eval_dependencies
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
bNode * group_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 127 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 233 of file BKE_node_runtime.hh.

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

◆ 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 134 of file BKE_node_runtime.hh.

Referenced by blender::add_tree_tag(), and blender::bke::is_tree_changed().

◆ compositor_effect_nodes_srna_data

std::shared_ptr<nodes::GeneratedTreeSrnaData> blender::bke::bNodeTreeRuntime::compositor_effect_nodes_srna_data

Contains RNA types generated for the compositor effect strip interface.

Definition at line 179 of file BKE_node_runtime.hh.

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

◆ compositor_nodes_srna_data

std::shared_ptr<nodes::GeneratedTreeSrnaData> blender::bke::bNodeTreeRuntime::compositor_nodes_srna_data

Contains RNA types generated for the compositor strip modifier interface.

Definition at line 177 of file BKE_node_runtime.hh.

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

◆ eval_dependencies

std::unique_ptr<nodes::EvalDependencies> blender::bke::bNodeTreeRuntime::eval_dependencies

Cache of dependencies used by the node tree itself. Does not account for data that's passed into the node tree from the outside. NOTE: The node tree may reference additional data-blocks besides the ones included here. But those are not used when the node tree is evaluated.

Definition at line 257 of file BKE_node_runtime.hh.

Referenced by blender::nodes::gather_eval_dependencies_with_cache(), blender::ed::geometry::gather_node_group_ids(), and blender::bke::node_foreach_id().

◆ execdata

◆ geometry_nodes_lazy_function_graph_info

std::shared_ptr<const nodes::GeometryNodesLazyFunctionGraphInfo> blender::bke::bNodeTreeRuntime::geometry_nodes_lazy_function_graph_info

◆ geometry_nodes_lazy_function_graph_info_mutex

CacheMutex blender::bke::bNodeTreeRuntime::geometry_nodes_lazy_function_graph_info_mutex

Execution data for geometry nodes. The data is independent of the owner tree, so taking shared ownership of geometry_nodes_lazy_function_graph_info allows the node tree to be evaluated even if the owner tree is freed already.

Definition at line 200 of file BKE_node_runtime.hh.

Referenced by blender::nodes::ensure_geometry_nodes_lazy_function_graph(), blender::bke::node_tree_runtime::preprocess_geometry_node_tree_for_evaluation(), and blender::bke::NodeTreeMainUpdater::update_rooted().

◆ geometry_nodes_srna_data

std::shared_ptr<nodes::GeneratedTreeSrnaData> blender::bke::bNodeTreeRuntime::geometry_nodes_srna_data

Contains RNA types generated for the geometry nodes modifier interface.

Definition at line 175 of file BKE_node_runtime.hh.

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

◆ gizmo_propagation

◆ 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 268 of file BKE_node_runtime.hh.

◆ has_undefined_nodes_or_sockets

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

◆ inferenced_input_socket_usage_mutex

CacheMutex blender::bke::bNodeTreeRuntime::inferenced_input_socket_usage_mutex

◆ inferenced_socket_usage

Array<nodes::socket_usage_inference::SocketUsage> blender::bke::bNodeTreeRuntime::inferenced_socket_usage

Indexed by #bNodeSocket::index_in_tree(). Contains information about whether the socket is used or visible.

Definition at line 192 of file BKE_node_runtime.hh.

Referenced by blender::ensure_inference_usage_cache().

◆ input_sockets

◆ invalid_zone_output_node_ids

Set<int> blender::bke::bNodeTreeRuntime::invalid_zone_output_node_ids

◆ is_updating

bool blender::bke::bNodeTreeRuntime::is_updating = false

Protect from recursive updates of node trees, see BKE_ntree_update_without_main.

Definition at line 148 of file BKE_node_runtime.hh.

Referenced by blender::BKE_ntree_update_without_main().

◆ last_valid_zones

std::shared_ptr<bNodeTreeZones> blender::bke::bNodeTreeRuntime::last_valid_zones

Same as tree_zones, but may not be valid anymore. This is used for drawing errors when the zone detection failed.

Definition at line 242 of file BKE_node_runtime.hh.

Referenced by blender::bke::get_tree_zones(), and blender::ed::space_node::node_draw_zones_and_frames().

◆ link_errors

MultiValueMap<NodeLinkKey, NodeLinkError> blender::bke::bNodeTreeRuntime::link_errors

Stores information about invalid links. This information is then displayed to the user. This is updated in #update_link_validation and is valid during drawing code.

Definition at line 214 of file BKE_node_runtime.hh.

Referenced by blender::ed::space_node::node_draw_nodetree().

◆ links

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

Only valid when #topology_cache_is_dirty is false.

Definition at line 260 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

◆ nodes_by_id

◆ 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 139 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 154 of file BKE_node_runtime.hh.

Referenced by blender::ed::space_node::ensure_nodetree_previews(), blender::ed::space_node::node_preview_acquire_ibuf(), blender::nodetree_mark_previews_dirty_reccursive(), and blender::ed::space_node::update_needed_flag().

◆ reference_lifetimes_info

std::unique_ptr<node_tree_reference_lifetimes::ReferenceLifetimesInfo> blender::bke::bNodeTreeRuntime::reference_lifetimes_info

◆ root_frames

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

◆ runtime_flag

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

◆ scene_compositor_effect_srna_data

std::shared_ptr<nodes::GeneratedTreeSrnaData> blender::bke::bNodeTreeRuntime::scene_compositor_effect_srna_data

Contains RNA types generated for the scene compositor effect interface.

Definition at line 181 of file BKE_node_runtime.hh.

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

◆ self_geometry_nodes_lazy_function_graph_info

const nodes::GeometryNodesLazyFunctionGraphInfo* blender::bke::bNodeTreeRuntime::self_geometry_nodes_lazy_function_graph_info
Initial value:
=
nullptr

Back-pointer if this is a node tree owned by geometry_nodes_lazy_function_graph_info.

Definition at line 207 of file BKE_node_runtime.hh.

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

◆ shader_node_errors

Map<int32_t, VectorSet<nodes::NodeWarning> > blender::bke::bNodeTreeRuntime::shader_node_errors

Error messages for shading nodes. Those don't have more contextual information yet. Maps #bNode::identifier to warnings.

Definition at line 220 of file BKE_node_runtime.hh.

Referenced by blender::ed::space_node::draw_nodetree().

◆ shader_node_errors_mutex

Mutex blender::bke::bNodeTreeRuntime::shader_node_errors_mutex

Definition at line 221 of file BKE_node_runtime.hh.

Referenced by blender::ed::space_node::draw_nodetree().

◆ 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 249 of file BKE_node_runtime.hh.

Referenced by blender::ed::space_node::draw_nodetree(), and blender::ed::space_node::node_link_is_gizmo_link().

◆ structure_type_interface

◆ 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 227 of file BKE_node_runtime.hh.

Referenced by blender::add_tree_tag(), blender::bke::node_tree_runtime::ensure_topology_cache(), and blender::bke::node_tree_runtime::topology_cache_is_available().

◆ toposort_left_to_right

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

◆ toposort_right_to_left

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

◆ tree_zones

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

Definition at line 236 of file BKE_node_runtime.hh.

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

◆ tree_zones_cache_mutex

CacheMutex blender::bke::bNodeTreeRuntime::tree_zones_cache_mutex

Definition at line 235 of file BKE_node_runtime.hh.

Referenced by blender::add_tree_tag(), and blender::bke::get_tree_zones().


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