[Bf-blender-cvs] [78d8e9f962f] functions: fix after merge

Jacques Lucke noreply at git.blender.org
Mon Mar 9 15:31:33 CET 2020


Commit: 78d8e9f962f619c07fe5704cb1cc108f760b84e9
Author: Jacques Lucke
Date:   Mon Mar 9 15:30:52 2020 +0100
Branches: functions
https://developer.blender.org/rB78d8e9f962f619c07fe5704cb1cc108f760b84e9

fix after merge

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

M	source/blender/functions/intern/multi_functions/surface_hook.cc
M	source/blender/simulations/bparticles/node_frontend.cpp

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

diff --git a/source/blender/functions/intern/multi_functions/surface_hook.cc b/source/blender/functions/intern/multi_functions/surface_hook.cc
index 2e84a40ec92..3b22a556a1a 100644
--- a/source/blender/functions/intern/multi_functions/surface_hook.cc
+++ b/source/blender/functions/intern/multi_functions/surface_hook.cc
@@ -309,7 +309,7 @@ void MF_GetWeightOnSurface::call(IndexMask mask, MFParams params, MFContext cont
             group_names,
             [&](const std::string &group, IndexMask indices_with_same_group) {
               MDeformVert *vertex_weights = mesh->dvert;
-              int group_index = defgroup_name_index(object, group.c_str());
+              int group_index = BKE_object_defgroup_name_index(object, group.c_str());
               if (group_index == -1 || vertex_weights == nullptr) {
                 r_weights.fill_indices(indices_on_same_surface, fallback);
                 return;
@@ -327,9 +327,9 @@ void MF_GetWeightOnSurface::call(IndexMask mask, MFParams params, MFContext cont
                 uint v2 = mesh->mloop[triangle.tri[1]].v;
                 uint v3 = mesh->mloop[triangle.tri[2]].v;
 
-                float3 corner_weights{defvert_find_weight(vertex_weights + v1, group_index),
-                                      defvert_find_weight(vertex_weights + v2, group_index),
-                                      defvert_find_weight(vertex_weights + v3, group_index)};
+                float3 corner_weights{BKE_defvert_find_weight(vertex_weights + v1, group_index),
+                                      BKE_defvert_find_weight(vertex_weights + v2, group_index),
+                                      BKE_defvert_find_weight(vertex_weights + v3, group_index)};
 
                 float weight = float3::dot(hook.bary_coords(), corner_weights);
                 r_weights[i] = weight;
@@ -509,13 +509,13 @@ static BLI_NOINLINE bool get_vertex_weights(Object *object,
   BLI_assert(r_vertex_weights.size() == mesh->totvert);
 
   MDeformVert *vertices = mesh->dvert;
-  int group_index = defgroup_name_index(object, group_name.data());
+  int group_index = BKE_object_defgroup_name_index(object, group_name.data());
   if (group_index == -1 || vertices == nullptr) {
     return false;
   }
 
   for (uint i : r_vertex_weights.index_range()) {
-    r_vertex_weights[i] = defvert_find_weight(vertices + i, group_index);
+    r_vertex_weights[i] = BKE_defvert_find_weight(vertices + i, group_index);
   }
   return true;
 }
diff --git a/source/blender/simulations/bparticles/node_frontend.cpp b/source/blender/simulations/bparticles/node_frontend.cpp
index bc49df5e0c4..f3dc4b7cd9b 100644
--- a/source/blender/simulations/bparticles/node_frontend.cpp
+++ b/source/blender/simulations/bparticles/node_frontend.cpp
@@ -844,13 +844,13 @@ static Vector<float> compute_emitter_vertex_weights(PointerRNA *node_rna,
     std::string group_name = inputs.relocate_out<std::string>(2, "Density Group");
 
     MDeformVert *vertices = mesh->dvert;
-    int group_index = defgroup_name_index(object, group_name.c_str());
+    int group_index = BKE_object_defgroup_name_index(object, group_name.c_str());
     if (group_index == -1 || vertices == nullptr) {
       vertex_weights.fill(0);
     }
     else {
       for (uint i = 0; i < mesh->totvert; i++) {
-        vertex_weights[i] = defvert_find_weight(vertices + i, group_index);
+        vertex_weights[i] = BKE_defvert_find_weight(vertices + i, group_index);
       }
     }
   }



More information about the Bf-blender-cvs mailing list