[Bf-blender-cvs] [6c1e5d7f349] functions: extract method that ensure all inputs
Jacques Lucke
noreply at git.blender.org
Sun Apr 28 21:16:03 CEST 2019
Commit: 6c1e5d7f3493c442f1caf1d406c85a3224e0e4d2
Author: Jacques Lucke
Date: Sun Apr 28 19:30:39 2019 +0200
Branches: functions
https://developer.blender.org/rB6c1e5d7f3493c442f1caf1d406c85a3224e0e4d2
extract method that ensure all inputs
===================================================================
M source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
===================================================================
diff --git a/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp b/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
index e1ef711d0c4..b4e3d6b8e2e 100644
--- a/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
+++ b/source/blender/functions/backends/tuple_call/fgraph_tuple_call.cpp
@@ -343,14 +343,8 @@ class ExecuteFGraph : public TupleCallBody {
}
}
else {
- bool all_inputs_computed = true;
-
- for (uint input_id : m_graph->input_ids_of_node(node_id)) {
- if (!storage.is_input_initialized(input_id)) {
- sockets_to_compute.push(DFGraphSocket::FromInput(input_id));
- all_inputs_computed = false;
- }
- }
+ bool all_inputs_computed = this->ensure_all_inputs(
+ node_id, storage, sockets_to_compute);
if (all_inputs_computed) {
BLI_assert(!m_node_info[node_id].is_lazy);
@@ -402,6 +396,20 @@ class ExecuteFGraph : public TupleCallBody {
}
}
+ bool ensure_all_inputs(uint node_id,
+ SocketValueStorage &storage,
+ SocketsToComputeStack &sockets_to_compute) const
+ {
+ bool all_inputs_computed = true;
+ for (uint input_id : m_graph->input_ids_of_node(node_id)) {
+ if (!storage.is_input_initialized(input_id)) {
+ sockets_to_compute.push(DFGraphSocket::FromInput(input_id));
+ all_inputs_computed = false;
+ }
+ }
+ return all_inputs_computed;
+ }
+
void copy_outputs_to_final_output_if_necessary(uint node_id,
SocketValueStorage &storage,
Tuple &fn_out) const
More information about the Bf-blender-cvs
mailing list