Blender V5.0
blender::nodes::geo_eval_log::GeoTreeLog Class Reference

#include <NOD_geometry_nodes_log.hh>

Public Member Functions

 GeoTreeLog (GeoNodesLog *root_log, Vector< GeoTreeLogger * > tree_loggers)
 ~GeoTreeLog ()
void ensure_node_warnings (const NodesModifierData &nmd)
void ensure_node_warnings (const Main &bmain)
void ensure_node_warnings (const Map< uint32_t, const bNodeTree * > &orig_tree_by_session_uid)
void ensure_execution_times ()
void ensure_socket_values ()
void ensure_viewer_node_logs ()
void ensure_existing_attributes ()
void ensure_used_named_attributes ()
void ensure_debug_messages ()
void ensure_evaluated_gizmo_nodes ()
void ensure_layer_names ()
ValueLogfind_socket_value_log (const bNodeSocket &query_socket)
bool try_convert_primitive_socket_value (const GenericValueLog &value_log, const CPPType &dst_type, void *dst)
template<typename T>
std::optional< Tfind_primitive_socket_value (const bNodeSocket &query_socket)

Public Attributes

Map< int32_t, GeoNodeLognodes
Map< int32_t, ViewerNodeLog *, 0 > viewer_node_logs
VectorSet< NodeWarningall_warnings
std::chrono::nanoseconds execution_time {0}
Vector< const GeometryAttributeInfo * > existing_attributes
Map< StringRefNull, NamedAttributeUsageused_named_attributes
Set< int > evaluated_gizmo_nodes
Vector< std::string > all_layer_names

Detailed Description

Contains data that has been logged for a specific node group in a context. If the same node group is used multiple times, there will be a different GeoTreeLog for every instance.

This contains lazily evaluated data. Call the corresponding ensure_* methods before accessing data.

Definition at line 374 of file NOD_geometry_nodes_log.hh.

Constructor & Destructor Documentation

◆ GeoTreeLog()

blender::nodes::geo_eval_log::GeoTreeLog::GeoTreeLog ( GeoNodesLog * root_log,
Vector< GeoTreeLogger * > tree_loggers )

Definition at line 288 of file geometry_nodes_log.cc.

References hash.

Referenced by ensure_node_warnings(), and ensure_used_named_attributes().

◆ ~GeoTreeLog()

blender::nodes::geo_eval_log::GeoTreeLog::~GeoTreeLog ( )
default

Member Function Documentation

◆ ensure_debug_messages()

void blender::nodes::geo_eval_log::GeoTreeLog::ensure_debug_messages ( )

◆ ensure_evaluated_gizmo_nodes()

void blender::nodes::geo_eval_log::GeoTreeLog::ensure_evaluated_gizmo_nodes ( )

◆ ensure_execution_times()

◆ ensure_existing_attributes()

void blender::nodes::geo_eval_log::GeoTreeLog::ensure_existing_attributes ( )

Definition at line 572 of file geometry_nodes_log.cc.

References ensure_socket_values(), existing_attributes, and nodes.

◆ ensure_layer_names()

void blender::nodes::geo_eval_log::GeoTreeLog::ensure_layer_names ( )

Definition at line 665 of file geometry_nodes_log.cc.

References all_layer_names, ensure_socket_values(), name, and nodes.

◆ ensure_node_warnings() [1/3]

void blender::nodes::geo_eval_log::GeoTreeLog::ensure_node_warnings ( const Main & bmain)

◆ ensure_node_warnings() [2/3]

◆ ensure_node_warnings() [3/3]

void blender::nodes::geo_eval_log::GeoTreeLog::ensure_node_warnings ( const NodesModifierData & nmd)

Propagate node warnings. This needs access to the node group pointers, because propagation settings are stored on the nodes. However, the log can only store weak pointers (in the form of e.g. session ids) to original data to avoid dangling pointers.

Definition at line 431 of file geometry_nodes_log.cc.

References BKE_library_foreach_ID_link(), bNodeTree::id, IDWALK_RET_NOP, and NodesModifierData::node_group.

Referenced by ensure_node_warnings(), ensure_node_warnings(), and blender::ed::geometry::run_node_group_exec().

◆ ensure_socket_values()

◆ ensure_used_named_attributes()

◆ ensure_viewer_node_logs()

◆ find_primitive_socket_value()

template<typename T>
std::optional< T > blender::nodes::geo_eval_log::GeoTreeLog::find_primitive_socket_value ( const bNodeSocket & query_socket)
inline

◆ find_socket_value_log()

ValueLog * blender::nodes::geo_eval_log::GeoTreeLog::find_socket_value_log ( const bNodeSocket & query_socket)

Geometry nodes does not log values for every socket. That would produce a lot of redundant data, because often many linked sockets have the same value. To find the logged value for a socket one might have to look at linked sockets as well.

Definition at line 695 of file geometry_nodes_log.cc.

References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add(), BLI_assert, bNode::identifier, blender::Stack< T, InlineBufferCapacity, Allocator >::is_empty(), nodes, blender::Stack< T, InlineBufferCapacity, Allocator >::pop(), blender::Stack< T, InlineBufferCapacity, Allocator >::push(), and tree.

Referenced by blender::nodes::node_geo_viewer_cc::draw_from_socket_log_value(), and find_primitive_socket_value().

◆ try_convert_primitive_socket_value()

Member Data Documentation

◆ all_layer_names

Vector<std::string> blender::nodes::geo_eval_log::GeoTreeLog::all_layer_names

Definition at line 397 of file NOD_geometry_nodes_log.hh.

Referenced by ensure_layer_names().

◆ all_warnings

VectorSet<NodeWarning> blender::nodes::geo_eval_log::GeoTreeLog::all_warnings

◆ evaluated_gizmo_nodes

Set<int> blender::nodes::geo_eval_log::GeoTreeLog::evaluated_gizmo_nodes

Definition at line 396 of file NOD_geometry_nodes_log.hh.

Referenced by ensure_evaluated_gizmo_nodes().

◆ execution_time

std::chrono::nanoseconds blender::nodes::geo_eval_log::GeoTreeLog::execution_time {0}

◆ existing_attributes

Vector<const GeometryAttributeInfo *> blender::nodes::geo_eval_log::GeoTreeLog::existing_attributes

Definition at line 394 of file NOD_geometry_nodes_log.hh.

Referenced by ensure_existing_attributes().

◆ nodes

◆ used_named_attributes

Map<StringRefNull, NamedAttributeUsage> blender::nodes::geo_eval_log::GeoTreeLog::used_named_attributes

◆ viewer_node_logs


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