[Bf-blender-cvs] [136ac83c82c] functions: change IndexMask constructor

Jacques Lucke noreply at git.blender.org
Thu Dec 19 13:21:21 CET 2019


Commit: 136ac83c82c334c33143019592d42132ab058a67
Author: Jacques Lucke
Date:   Thu Dec 19 10:37:13 2019 +0100
Branches: functions
https://developer.blender.org/rB136ac83c82c334c33143019592d42132ab058a67

change IndexMask constructor

===================================================================

M	source/blender/blenlib/BLI_index_mask.h
M	source/blender/functions/intern/multi_functions/network.cc
M	source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
M	source/blender/simulations/bparticles/emitters.cpp
M	source/blender/simulations/bparticles/node_frontend.cpp

===================================================================

diff --git a/source/blender/blenlib/BLI_index_mask.h b/source/blender/blenlib/BLI_index_mask.h
index 82c082b1955..c148aea2944 100644
--- a/source/blender/blenlib/BLI_index_mask.h
+++ b/source/blender/blenlib/BLI_index_mask.h
@@ -24,7 +24,7 @@ class IndexMask {
   {
   }
 
-  IndexMask(const std::initializer_list<uint> &list) : IndexMask(ArrayRef<uint>(list))
+  explicit IndexMask(uint n) : IndexMask(IndexRange(n))
   {
   }
 
diff --git a/source/blender/functions/intern/multi_functions/network.cc b/source/blender/functions/intern/multi_functions/network.cc
index 67998894098..b6ea8ee4a4c 100644
--- a/source/blender/functions/intern/multi_functions/network.cc
+++ b/source/blender/functions/intern/multi_functions/network.cc
@@ -378,7 +378,7 @@ BLI_NOINLINE void MF_EvaluateNetwork::compute_and_forward_outputs(
     MFParamsBuilder params_builder(function, 1);
 
     this->prepare_function_params__single(function_node, storage, params_builder);
-    function.call({0}, params_builder, global_context);
+    function.call(IndexMask(1), params_builder, global_context);
     this->forward_computed_values__single(function_node, storage, params_builder);
   }
   else {
diff --git a/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc b/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
index a007db54bed..fd3a73934e3 100644
--- a/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
+++ b/source/blender/modifiers/intern/MOD_functionpoints_cxx.cc
@@ -63,7 +63,7 @@ Mesh *MOD_functionpoints_do(FunctionPointsModifierData *fpmd,
   context_builder.add_global_context(id_handle_lookup);
   context_builder.add_global_context(time_context);
 
-  function->call({0}, params_builder, context_builder);
+  function->call(BLI::IndexMask(1), params_builder, context_builder);
 
   ArrayRef<float3> output_points = vector_array[0].as_typed_ref<float3>();
 
diff --git a/source/blender/simulations/bparticles/emitters.cpp b/source/blender/simulations/bparticles/emitters.cpp
index 6d3bd3bc12e..5f9a4260319 100644
--- a/source/blender/simulations/bparticles/emitters.cpp
+++ b/source/blender/simulations/bparticles/emitters.cpp
@@ -390,7 +390,7 @@ void CustomEmitter::emit(EmitterInterface &interface)
   context_builder.add_global_context(m_id_handle_lookup);
   context_builder.add_global_context(time_context);
 
-  m_emitter_function.call({0}, params_builder, context_builder);
+  m_emitter_function.call(BLI::IndexMask(1), params_builder, context_builder);
 
   int particle_count = -1;
 
diff --git a/source/blender/simulations/bparticles/node_frontend.cpp b/source/blender/simulations/bparticles/node_frontend.cpp
index 18a580c9c62..e9245fc56db 100644
--- a/source/blender/simulations/bparticles/node_frontend.cpp
+++ b/source/blender/simulations/bparticles/node_frontend.cpp
@@ -190,7 +190,7 @@ class InlinedTreeData {
       params_builder.add_single_output(
           FN::GenericMutableArrayRef(tuple.info().type_at_index(i), tuple.element_ptr(i), 1));
     }
-    fn->call({0}, params_builder, context_builder);
+    fn->call(BLI::IndexMask(1), params_builder, context_builder);
     tuple.set_all_initialized();
 
     Vector<std::string> computed_names;



More information about the Bf-blender-cvs mailing list