Changeset View
Changeset View
Standalone View
Standalone View
source/blender/blenkernel/BKE_node_ui_storage.hh
| Show First 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | struct AvailableAttributeInfo { | ||||
| friend bool operator==(const AvailableAttributeInfo &a, const AvailableAttributeInfo &b) | friend bool operator==(const AvailableAttributeInfo &a, const AvailableAttributeInfo &b) | ||||
| { | { | ||||
| return a.name == b.name; | return a.name == b.name; | ||||
| } | } | ||||
| }; | }; | ||||
| struct NodeUIStorage { | struct NodeUIStorage { | ||||
| std::mutex mutex; | |||||
| blender::Vector<NodeWarning> warnings; | blender::Vector<NodeWarning> warnings; | ||||
| blender::Set<AvailableAttributeInfo> attribute_hints; | blender::Set<AvailableAttributeInfo> attribute_hints; | ||||
| NodeUIStorage() = default; | |||||
| /* Needed because the mutex can't be moved or copied. */ | |||||
| NodeUIStorage(NodeUIStorage &&other) | |||||
| : warnings(std::move(other.warnings)), attribute_hints(std::move(other.attribute_hints)) | |||||
| { | |||||
| } | |||||
| }; | }; | ||||
| struct NodeTreeUIStorage { | struct NodeTreeUIStorage { | ||||
| std::mutex mutex; | |||||
| blender::Map<NodeTreeEvaluationContext, blender::Map<std::string, NodeUIStorage>> context_map; | blender::Map<NodeTreeEvaluationContext, blender::Map<std::string, NodeUIStorage>> context_map; | ||||
| std::mutex context_map_mutex; | |||||
| /** | /** | ||||
| * Attribute search uses this to store the fake info for the string typed into a node, in order | * Attribute search uses this to store the fake info for the string typed into a node, in order | ||||
| * to pass the info to the execute callback that sets node socket values. This is mutable since | * to pass the info to the execute callback that sets node socket values. This is mutable since | ||||
| * we can count on only one attribute search being open at a time, and there is no real data | * we can count on only one attribute search being open at a time, and there is no real data | ||||
| * stored here. | * stored here. | ||||
| */ | */ | ||||
| mutable AvailableAttributeInfo dummy_info_for_search; | mutable AvailableAttributeInfo dummy_info_for_search; | ||||
| Show All 21 Lines | |||||