Changeset View
Changeset View
Standalone View
Standalone View
source/blender/nodes/NOD_geometry_nodes_log.hh
| Show All 22 Lines | |||||
| * thread-local loggers to provide simple access. Importantly, the (preprocessed) log is only | * thread-local loggers to provide simple access. Importantly, the (preprocessed) log is only | ||||
| * created when it is actually used by UI code. | * created when it is actually used by UI code. | ||||
| */ | */ | ||||
| #include <chrono> | #include <chrono> | ||||
| #include "BLI_compute_context.hh" | #include "BLI_compute_context.hh" | ||||
| #include "BLI_enumerable_thread_specific.hh" | #include "BLI_enumerable_thread_specific.hh" | ||||
| #include "BLI_function_ref.hh" | |||||
| #include "BLI_generic_pointer.hh" | #include "BLI_generic_pointer.hh" | ||||
| #include "BLI_multi_value_map.hh" | #include "BLI_multi_value_map.hh" | ||||
| #include "BKE_attribute.h" | #include "BKE_attribute.h" | ||||
| #include "BKE_geometry_set.hh" | #include "BKE_geometry_set.hh" | ||||
| #include "BKE_viewer_path.h" | #include "BKE_viewer_path.h" | ||||
| #include "FN_field.hh" | #include "FN_field.hh" | ||||
| ▲ Show 20 Lines • Show All 245 Lines • ▼ Show 20 Lines | public: | ||||
| void ensure_viewer_node_logs(); | void ensure_viewer_node_logs(); | ||||
| void ensure_existing_attributes(); | void ensure_existing_attributes(); | ||||
| void ensure_used_named_attributes(); | void ensure_used_named_attributes(); | ||||
| void ensure_debug_messages(); | void ensure_debug_messages(); | ||||
| ValueLog *find_socket_value_log(const bNodeSocket &query_socket); | ValueLog *find_socket_value_log(const bNodeSocket &query_socket); | ||||
| }; | }; | ||||
| inline Vector<ValueLog *> multi_input_socket_value_logs(GeoTreeLog &tree_log, | |||||
| const bNodeSocket &query_socket) | |||||
| { | |||||
| BLI_assert(query_socket.is_multi_input()); | |||||
| Vector<ValueLog *> logs; | |||||
| logs.reserve(query_socket.directly_linked_sockets().size()); | |||||
| for (const bNodeSocket *socket : query_socket.directly_linked_sockets()) { | |||||
| logs.append(tree_log.find_socket_value_log(*socket)); | |||||
| } | |||||
| return logs; | |||||
| } | |||||
| /** | /** | ||||
| * There is one #GeoModifierLog for every modifier that evaluates geometry nodes. It contains all | * There is one #GeoModifierLog for every modifier that evaluates geometry nodes. It contains all | ||||
| * the loggers that are used during evaluation as well as the preprocessed logs that are used by UI | * the loggers that are used during evaluation as well as the preprocessed logs that are used by UI | ||||
| * code. | * code. | ||||
| */ | */ | ||||
| class GeoModifierLog { | class GeoModifierLog { | ||||
| private: | private: | ||||
| /** Data that is stored for each thread. */ | /** Data that is stored for each thread. */ | ||||
| ▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines | |||||