Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'source/blender/nodes/NOD_node_tree_multi_function.hh')
-rw-r--r--source/blender/nodes/NOD_node_tree_multi_function.hh17
1 files changed, 8 insertions, 9 deletions
diff --git a/source/blender/nodes/NOD_node_tree_multi_function.hh b/source/blender/nodes/NOD_node_tree_multi_function.hh
index df31ee18369..de1f5a0dc70 100644
--- a/source/blender/nodes/NOD_node_tree_multi_function.hh
+++ b/source/blender/nodes/NOD_node_tree_multi_function.hh
@@ -29,7 +29,7 @@
#include "NOD_type_callbacks.hh"
#include "BLI_multi_value_map.hh"
-#include "BLI_resource_collector.hh"
+#include "BLI_resource_scope.hh"
namespace blender::nodes {
@@ -190,7 +190,7 @@ class MFNetworkTreeMap {
* This data is necessary throughout the generation of a MFNetwork from a node tree.
*/
struct CommonMFNetworkBuilderData {
- ResourceCollector &resources;
+ ResourceScope &scope;
fn::MFNetwork &network;
MFNetworkTreeMap &network_map;
const DerivedNodeTree &tree;
@@ -225,9 +225,9 @@ class MFNetworkBuilderBase {
* Returns a resource collector that will only be destructed after the multi-function network is
* destructed.
*/
- ResourceCollector &resources()
+ ResourceScope &resource_scope()
{
- return common_.resources;
+ return common_.scope;
}
/**
@@ -236,9 +236,9 @@ class MFNetworkBuilderBase {
template<typename T, typename... Args> T &construct_fn(Args &&... args)
{
BLI_STATIC_ASSERT((std::is_base_of_v<fn::MultiFunction, T>), "");
- void *buffer = common_.resources.linear_allocator().allocate(sizeof(T), alignof(T));
+ void *buffer = common_.scope.linear_allocator().allocate(sizeof(T), alignof(T));
T *fn = new (buffer) T(std::forward<Args>(args)...);
- common_.resources.add(destruct_ptr<T>(fn), fn->name().c_str());
+ common_.scope.add(destruct_ptr<T>(fn), fn->name().c_str());
return *fn;
}
};
@@ -382,11 +382,10 @@ class NodeMFNetworkBuilder : public MFNetworkBuilderBase {
MFNetworkTreeMap insert_node_tree_into_mf_network(fn::MFNetwork &network,
const DerivedNodeTree &tree,
- ResourceCollector &resources);
+ ResourceScope &scope);
using MultiFunctionByNode = Map<DNode, const fn::MultiFunction *>;
-MultiFunctionByNode get_multi_function_per_node(const DerivedNodeTree &tree,
- ResourceCollector &resources);
+MultiFunctionByNode get_multi_function_per_node(const DerivedNodeTree &tree, ResourceScope &scope);
class DataTypeConversions {
private: