[Bf-blender-cvs] [bb2178b96be] refactor-mesh-remove-pointers: Merge branch 'refactor-mesh-hide-generic' into refactor-mesh-remove-pointers

Hans Goudey noreply at git.blender.org
Mon Aug 8 22:35:06 CEST 2022


Commit: bb2178b96be918f21fd2451044d57ee864a2de91
Author: Hans Goudey
Date:   Mon Aug 8 15:29:12 2022 -0500
Branches: refactor-mesh-remove-pointers
https://developer.blender.org/rBbb2178b96be918f21fd2451044d57ee864a2de91

Merge branch 'refactor-mesh-hide-generic' into refactor-mesh-remove-pointers

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



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

diff --cc source/blender/blenkernel/intern/mesh_sample.cc
index 596744797b1,e54f2e6d687..4a7b2b3040d
--- a/source/blender/blenkernel/intern/mesh_sample.cc
+++ b/source/blender/blenkernel/intern/mesh_sample.cc
@@@ -17,11 -16,10 +17,11 @@@ template<typename T
  BLI_NOINLINE static void sample_point_attribute(const Mesh &mesh,
                                                  const Span<int> looptri_indices,
                                                  const Span<float3> bary_coords,
-                                                 const VArray<T> &data_in,
+                                                 const VArray<T> &src,
                                                  const IndexMask mask,
-                                                 const MutableSpan<T> data_out)
+                                                 const MutableSpan<T> dst)
  {
 +  const Span<MLoop> loops = mesh_loops(mesh);
    const Span<MLoopTri> looptris{BKE_mesh_runtime_looptri_ensure(&mesh),
                                  BKE_mesh_runtime_looptri_len(&mesh)};
  
@@@ -30,16 -28,16 +30,16 @@@
      const MLoopTri &looptri = looptris[looptri_index];
      const float3 &bary_coord = bary_coords[i];
  
 -    const int v0_index = mesh.mloop[looptri.tri[0]].v;
 -    const int v1_index = mesh.mloop[looptri.tri[1]].v;
 -    const int v2_index = mesh.mloop[looptri.tri[2]].v;
 +    const int v0_index = loops[looptri.tri[0]].v;
 +    const int v1_index = loops[looptri.tri[1]].v;
 +    const int v2_index = loops[looptri.tri[2]].v;
  
-     const T v0 = data_in[v0_index];
-     const T v1 = data_in[v1_index];
-     const T v2 = data_in[v2_index];
+     const T v0 = src[v0_index];
+     const T v1 = src[v1_index];
+     const T v2 = src[v2_index];
  
      const T interpolated_value = attribute_math::mix3(bary_coord, v0, v1, v2);
-     data_out[i] = interpolated_value;
+     dst[i] = interpolated_value;
    }
  }
  
diff --cc source/blender/geometry/intern/add_curves_on_mesh.cc
index 28d103f8755,299040d4d32..49592fd6519
--- a/source/blender/geometry/intern/add_curves_on_mesh.cc
+++ b/source/blender/geometry/intern/add_curves_on_mesh.cc
@@@ -1,9 -1,9 +1,10 @@@
  /* SPDX-License-Identifier: GPL-2.0-or-later */
  
  #include "BLI_length_parameterize.hh"
+ #include "BLI_task.hh"
  
  #include "BKE_attribute_math.hh"
 +#include "BKE_mesh.h"
  #include "BKE_mesh_sample.hh"
  
  #include "GEO_add_curves_on_mesh.hh"



More information about the Bf-blender-cvs mailing list