|
Blender V4.5
|
#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 () |
| ValueLog * | find_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< T > | find_primitive_socket_value (const bNodeSocket &query_socket) |
Public Attributes | |
| Map< int32_t, GeoNodeLog > | nodes |
| Map< int32_t, ViewerNodeLog *, 0 > | viewer_node_logs |
| VectorSet< NodeWarning > | all_warnings |
| std::chrono::nanoseconds | execution_time {0} |
| Vector< const GeometryAttributeInfo * > | existing_attributes |
| Map< StringRefNull, NamedAttributeUsage > | used_named_attributes |
| Set< int > | evaluated_gizmo_nodes |
| Vector< std::string > | all_layer_names |
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 342 of file NOD_geometry_nodes_log.hh.
| blender::nodes::geo_eval_log::GeoTreeLog::GeoTreeLog | ( | GeoNodesLog * | root_log, |
| Vector< GeoTreeLogger * > | tree_loggers ) |
Definition at line 273 of file geometry_nodes_log.cc.
References hash.
Referenced by ensure_node_warnings(), and ensure_used_named_attributes().
|
default |
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_debug_messages | ( | ) |
Definition at line 592 of file geometry_nodes_log.cc.
References blender::nodes::geo_eval_log::GeoTreeLogger::DebugMessage::message, blender::nodes::geo_eval_log::GeoTreeLogger::DebugMessage::node_id, and nodes.
Referenced by blender::ed::space_node::node_get_extra_info().
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_evaluated_gizmo_nodes | ( | ) |
Definition at line 606 of file geometry_nodes_log.cc.
References evaluated_gizmo_nodes, and blender::nodes::geo_eval_log::GeoTreeLogger::EvaluatedGizmoNode::node_id.
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_execution_times | ( | ) |
Definition at line 483 of file geometry_nodes_log.cc.
References blender::nodes::geo_eval_log::GeoTreeLogger::NodeExecutionTime::end, execution_time, blender::nodes::geo_eval_log::GeoTreeLogger::NodeExecutionTime::node_id, nodes, and blender::nodes::geo_eval_log::GeoTreeLogger::NodeExecutionTime::start.
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_existing_attributes | ( | ) |
Definition at line 529 of file geometry_nodes_log.cc.
References ensure_socket_values(), existing_attributes, and nodes.
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_layer_names | ( | ) |
Definition at line 622 of file geometry_nodes_log.cc.
References all_layer_names, ensure_socket_values(), and nodes.
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_node_warnings | ( | const Main & | bmain | ) |
Definition at line 415 of file geometry_nodes_log.cc.
References blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_new(), ensure_node_warnings(), FOREACH_NODETREE_BEGIN, FOREACH_NODETREE_END, and tree.
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_node_warnings | ( | const Map< uint32_t, const bNodeTree * > & | orig_tree_by_session_uid | ) |
Definition at line 428 of file geometry_nodes_log.cc.
References all_warnings, ensure_node_warnings(), GeoTreeLog(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_default(), blender::nodes::geo_eval_log::GeoTreeLogger::WarningWithNode::node_id, NODE_WARNING_PROPAGATION_ALL, nodes, blender::nodes::geo_eval_log::GeoTreeLogger::parent_node_id, tree, blender::nodes::geo_eval_log::NodeWarning::type, blender::nodes::geo_eval_log::GeoTreeLogger::WarningWithNode::warning, and blender::nodes::geo_eval_log::warning_is_propagated().
| 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 388 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().
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_socket_values | ( | ) |
Definition at line 498 of file geometry_nodes_log.cc.
References blender::nodes::geo_eval_log::GeoTreeLogger::SocketValueLog::node_id, nodes, blender::nodes::geo_eval_log::GeoTreeLogger::SocketValueLog::socket_index, and blender::nodes::geo_eval_log::GeoTreeLogger::SocketValueLog::value.
Referenced by blender::nodes::inverse_eval::backpropagate_socket_values_through_node(), blender::ed::space_node::create_log_inspection_string(), ensure_existing_attributes(), and ensure_layer_names().
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_used_named_attributes | ( | ) |
Definition at line 557 of file geometry_nodes_log.cc.
References blender::nodes::geo_eval_log::GeoTreeLogger::AttributeUsageWithNode::attribute_name, ensure_used_named_attributes(), GeoTreeLog(), blender::nodes::geo_eval_log::GeoTreeLogger::AttributeUsageWithNode::node_id, nodes, blender::nodes::geo_eval_log::GeoTreeLogger::AttributeUsageWithNode::usage, and used_named_attributes.
Referenced by blender::nodes::draw_named_attributes_panel(), ensure_used_named_attributes(), and blender::ed::space_node::node_get_accessed_attributes_row().
| void blender::nodes::geo_eval_log::GeoTreeLog::ensure_viewer_node_logs | ( | ) |
Definition at line 516 of file geometry_nodes_log.cc.
References blender::nodes::geo_eval_log::GeoTreeLogger::ViewerNodeLogWithNode::node_id, blender::nodes::geo_eval_log::GeoTreeLogger::ViewerNodeLogWithNode::viewer_log, and viewer_node_logs.
Referenced by blender::nodes::geo_eval_log::GeoNodesLog::find_viewer_node_log_for_path().
|
inline |
Definition at line 394 of file NOD_geometry_nodes_log.hh.
References find_socket_value_log(), blender::CPPType::get(), T, and try_convert_primitive_socket_value().
Referenced by blender::nodes::inverse_eval::get_logged_socket_value().
| 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 652 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(), and blender::Stack< T, InlineBufferCapacity, Allocator >::push().
Referenced by blender::ed::space_node::create_log_inspection_string(), and find_primitive_socket_value().
|
nodiscard |
Definition at line 726 of file geometry_nodes_log.cc.
References blender::bke::DataTypeConversions::convert_to_uninitialized(), blender::CPPType::destruct(), blender::GMutablePointer::get(), blender::bke::get_implicit_type_conversions(), blender::bke::DataTypeConversions::is_convertible(), blender::GMutablePointer::type(), and blender::nodes::geo_eval_log::GenericValueLog::value.
Referenced by find_primitive_socket_value().
| Vector<std::string> blender::nodes::geo_eval_log::GeoTreeLog::all_layer_names |
Definition at line 365 of file NOD_geometry_nodes_log.hh.
Referenced by ensure_layer_names().
| VectorSet<NodeWarning> blender::nodes::geo_eval_log::GeoTreeLog::all_warnings |
Definition at line 360 of file NOD_geometry_nodes_log.hh.
Referenced by ensure_node_warnings(), and blender::ed::geometry::run_node_group_exec().
| Set<int> blender::nodes::geo_eval_log::GeoTreeLog::evaluated_gizmo_nodes |
Definition at line 364 of file NOD_geometry_nodes_log.hh.
Referenced by ensure_evaluated_gizmo_nodes().
| std::chrono::nanoseconds blender::nodes::geo_eval_log::GeoTreeLog::execution_time {0} |
Definition at line 361 of file NOD_geometry_nodes_log.hh.
Referenced by ensure_execution_times(), and blender::ed::space_node::geo_node_get_execution_time().
| Vector<const GeometryAttributeInfo *> blender::nodes::geo_eval_log::GeoTreeLog::existing_attributes |
Definition at line 362 of file NOD_geometry_nodes_log.hh.
Referenced by ensure_existing_attributes().
| Map<int32_t, GeoNodeLog> blender::nodes::geo_eval_log::GeoTreeLog::nodes |
Definition at line 358 of file NOD_geometry_nodes_log.hh.
Referenced by ensure_debug_messages(), ensure_execution_times(), ensure_existing_attributes(), ensure_layer_names(), ensure_node_warnings(), ensure_socket_values(), ensure_used_named_attributes(), find_socket_value_log(), blender::ed::space_node::geo_node_get_execution_time(), blender::ed::space_node::node_add_error_message_button(), blender::ed::space_node::node_get_accessed_attributes_row(), and blender::ed::space_node::node_get_extra_info().
| Map<StringRefNull, NamedAttributeUsage> blender::nodes::geo_eval_log::GeoTreeLog::used_named_attributes |
Definition at line 363 of file NOD_geometry_nodes_log.hh.
Referenced by blender::nodes::draw_named_attributes_panel(), and ensure_used_named_attributes().
| Map<int32_t, ViewerNodeLog *, 0> blender::nodes::geo_eval_log::GeoTreeLog::viewer_node_logs |
Definition at line 359 of file NOD_geometry_nodes_log.hh.
Referenced by ensure_viewer_node_logs(), and blender::nodes::geo_eval_log::GeoNodesLog::find_viewer_node_log_for_path().