|
Blender
V2.93
|
#include "CLG_log.h"#include <mutex>#include "BLI_map.hh"#include "BLI_string_ref.hh"#include "BLI_vector.hh"#include "DNA_node_types.h"#include "DNA_object_types.h"#include "BKE_context.h"#include "BKE_node_ui_storage.hh"#include "BKE_object.h"Go to the source code of this file.
Functions | |
| static void | ui_storage_ensure (bNodeTree &ntree) |
| const NodeUIStorage * | BKE_node_tree_ui_storage_get_from_context (const bContext *C, const bNodeTree &ntree, const bNode &node) |
| void | BKE_nodetree_ui_storage_free_for_context (bNodeTree &ntree, const NodeTreeEvaluationContext &context) |
| static void | node_error_message_log (bNodeTree &ntree, const bNode &node, const StringRef message, const NodeWarningType type) |
| static NodeUIStorage & | node_ui_storage_ensure (bNodeTree &ntree, const NodeTreeEvaluationContext &context, const bNode &node) |
| void | BKE_nodetree_error_message_add (bNodeTree &ntree, const NodeTreeEvaluationContext &context, const bNode &node, const NodeWarningType type, std::string message) |
| void | BKE_nodetree_attribute_hint_add (bNodeTree &ntree, const NodeTreeEvaluationContext &context, const bNode &node, const StringRef attribute_name, const AttributeDomain domain, const CustomDataType data_type) |
Variables | |
| static CLG_LogRef | LOG = {"bke.node_ui_storage"} |
| static std::mutex | global_ui_storage_mutex |
| const NodeUIStorage* BKE_node_tree_ui_storage_get_from_context | ( | const bContext * | C, |
| const bNodeTree & | ntree, | ||
| const bNode & | node | ||
| ) |
Definition at line 55 of file node_ui_storage.cc.
References BKE_object_active_modifier(), C, context, NodeTreeUIStorage::context_map, CTX_data_active_object(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_ptr_as(), node, ntree, and bNodeTree::ui_storage.
Referenced by node_add_error_message_button(), and node_geometry_add_attribute_search_button().
| void BKE_nodetree_attribute_hint_add | ( | bNodeTree & | ntree, |
| const NodeTreeEvaluationContext & | context, | ||
| const bNode & | node, | ||
| const StringRef | attribute_name, | ||
| const AttributeDomain | domain, | ||
| const CustomDataType | data_type | ||
| ) |
Definition at line 158 of file node_ui_storage.cc.
References blender::Set< Key, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::add_as(), NodeUIStorage::attribute_hints, context, node, node_ui_storage_ensure(), and ntree.
Referenced by log_ui_hints().
| void BKE_nodetree_error_message_add | ( | bNodeTree & | ntree, |
| const NodeTreeEvaluationContext & | context, | ||
| const bNode & | node, | ||
| const NodeWarningType | type, | ||
| std::string | message | ||
| ) |
Definition at line 146 of file node_ui_storage.cc.
References blender::Vector< T, InlineBufferCapacity, Allocator >::append(), context, node, node_error_message_log(), node_ui_storage_ensure(), ntree, type, and NodeUIStorage::warnings.
Referenced by blender::nodes::GeoNodeExecParams::error_message_add().
| void BKE_nodetree_ui_storage_free_for_context | ( | bNodeTree & | ntree, |
| const NodeTreeEvaluationContext & | context | ||
| ) |
Removes only the UI data associated with a particular evaluation context. The same node tree can be used for execution in multiple places, but the entire UI storage can't be removed when one execution starts, or all of the data associated with the node tree would be lost.
Definition at line 88 of file node_ui_storage.cc.
References context, NodeTreeUIStorage::context_map, NodeTreeUIStorage::context_map_mutex, ntree, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::remove(), and bNodeTree::ui_storage.
Referenced by reset_tree_ui_storage().
|
static |
Definition at line 98 of file node_ui_storage.cc.
References CLOG_ERROR, CLOG_INFO, CLOG_WARN, blender::StringRefBase::data(), Error, bNodeTree::id, Info, LOG, ID::name, node, ntree, type, and Warning.
Referenced by BKE_nodetree_error_message_add().
|
static |
Definition at line 129 of file node_ui_storage.cc.
References context, NodeTreeUIStorage::context_map, NodeTreeUIStorage::context_map_mutex, blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default(), blender::Map< Key, Value, InlineBufferCapacity, ProbingStrategy, Hash, IsEqual, Slot, Allocator >::lookup_or_add_default_as(), node, ntree, bNodeTree::ui_storage, and ui_storage_ensure().
Referenced by BKE_nodetree_attribute_hint_add(), and BKE_nodetree_error_message_add().
|
static |
Definition at line 42 of file node_ui_storage.cc.
References global_ui_storage_mutex, ntree, and bNodeTree::ui_storage.
Referenced by node_ui_storage_ensure().
|
static |
Definition at line 40 of file node_ui_storage.cc.
Referenced by ui_storage_ensure().
|
static |
Definition at line 32 of file node_ui_storage.cc.
Referenced by node_error_message_log().