Blender  V2.93
Functions | Variables
node_ui_storage.cc File Reference
#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 NodeUIStorageBKE_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 NodeUIStoragenode_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
 

Function Documentation

◆ BKE_node_tree_ui_storage_get_from_context()

const NodeUIStorage* BKE_node_tree_ui_storage_get_from_context ( const bContext C,
const bNodeTree ntree,
const bNode node 
)

◆ BKE_nodetree_attribute_hint_add()

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 
)

◆ BKE_nodetree_error_message_add()

void BKE_nodetree_error_message_add ( bNodeTree ntree,
const NodeTreeEvaluationContext context,
const bNode node,
const NodeWarningType  type,
std::string  message 
)

◆ BKE_nodetree_ui_storage_free_for_context()

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().

◆ node_error_message_log()

static void node_error_message_log ( bNodeTree ntree,
const bNode node,
const StringRef  message,
const NodeWarningType  type 
)
static

◆ node_ui_storage_ensure()

static NodeUIStorage& node_ui_storage_ensure ( bNodeTree ntree,
const NodeTreeEvaluationContext context,
const bNode node 
)
static

◆ ui_storage_ensure()

static void ui_storage_ensure ( bNodeTree ntree)
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().

Variable Documentation

◆ global_ui_storage_mutex

std::mutex global_ui_storage_mutex
static

Definition at line 40 of file node_ui_storage.cc.

Referenced by ui_storage_ensure().

◆ LOG

CLG_LogRef LOG = {"bke.node_ui_storage"}
static

Definition at line 32 of file node_ui_storage.cc.

Referenced by node_error_message_log().