[Bf-blender-cvs] [ab9a01313f6] functions: add resources to data graph instead of function
Jacques Lucke
noreply at git.blender.org
Thu Sep 26 18:16:00 CEST 2019
Commit: ab9a01313f69c2e49fee48b4e879d0b4db9427a6
Author: Jacques Lucke
Date: Thu Sep 26 18:15:55 2019 +0200
Branches: functions
https://developer.blender.org/rBab9a01313f69c2e49fee48b4e879d0b4db9427a6
add resources to data graph instead of function
===================================================================
M source/blender/functions/core/data_graph.cpp
M source/blender/functions/core/function.cpp
M source/blender/functions/frontends/data_flow_nodes/unlinked_input_inserters.cpp
===================================================================
diff --git a/source/blender/functions/core/data_graph.cpp b/source/blender/functions/core/data_graph.cpp
index c0621dd396a..f4fcae37569 100644
--- a/source/blender/functions/core/data_graph.cpp
+++ b/source/blender/functions/core/data_graph.cpp
@@ -24,6 +24,10 @@ DataGraph::~DataGraph()
node.source_info->~SourceInfo();
}
}
+
+ if (m_resources) {
+ m_resources->print("Data Graph");
+ }
}
void DataGraph::print_socket(DataSocket socket) const
diff --git a/source/blender/functions/core/function.cpp b/source/blender/functions/core/function.cpp
index f2f042015df..9ccf432e6cd 100644
--- a/source/blender/functions/core/function.cpp
+++ b/source/blender/functions/core/function.cpp
@@ -30,6 +30,10 @@ Function::~Function()
}
}
+ if (m_resources) {
+ m_resources->print(m_name);
+ }
+
MEM_freeN((void *)m_strings);
}
diff --git a/source/blender/functions/frontends/data_flow_nodes/unlinked_input_inserters.cpp b/source/blender/functions/frontends/data_flow_nodes/unlinked_input_inserters.cpp
index 6a56cb0e13a..c603a8bbbe5 100644
--- a/source/blender/functions/frontends/data_flow_nodes/unlinked_input_inserters.cpp
+++ b/source/blender/functions/frontends/data_flow_nodes/unlinked_input_inserters.cpp
@@ -184,9 +184,9 @@ void ConstantInputsHandler::insert(VTreeDataGraphBuilder &builder,
tuple_call_body.set_tuple(inputs_tuple.get());
build_ir_body.set_tuple(inputs_tuple.get());
- fn->add_resource(std::move(inputs_meta), "Meta information for tuple");
- fn->add_resource(std::move(inputs_tuple_data_init), "Buffer for tuple");
- fn->add_resource(std::move(inputs_tuple), "Tuple containing function inputs");
+ builder.add_resource(std::move(inputs_meta), "Meta information for tuple");
+ builder.add_resource(std::move(inputs_tuple_data_init), "Buffer for tuple");
+ builder.add_resource(std::move(inputs_tuple), "Tuple containing function inputs");
BuilderNode *node = builder.insert_function(fn);
r_new_origins.copy_from(node->outputs());
More information about the Bf-blender-cvs
mailing list