Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHans Goudey <h.goudey@me.com>2022-08-24 22:09:36 +0300
committerHans Goudey <h.goudey@me.com>2022-08-24 22:09:36 +0300
commit3f1bac2c639ae003a9b33157de6c68d00f09ce3a (patch)
treef9dd3a71a32593c0ed45aa7a10b23f959881afd1 /source/blender/editors/sculpt_paint
parentde29ddebfc972cbf4b5a63eb9b39b2d4a4ff6abe (diff)
Rename polygons to polys and vertices to verts
Diffstat (limited to 'source/blender/editors/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_add.cc12
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_puff.cc10
-rw-r--r--source/blender/editors/sculpt_paint/curves_sculpt_slide.cc6
-rw-r--r--source/blender/editors/sculpt_paint/paint_mask.c14
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex.cc16
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc11
-rw-r--r--source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c12
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c14
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_expand.c12
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_face_set.c8
-rw-r--r--source/blender/editors/sculpt_paint/sculpt_geodesic.c6
12 files changed, 62 insertions, 63 deletions
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
index 12d3d9d663e..c9208f7196d 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_add.cc
@@ -90,7 +90,7 @@ struct AddOperationExecutor {
Object *surface_ob_eval_ = nullptr;
Mesh *surface_eval_ = nullptr;
- Span<MVert> surface_vertices_eval_;
+ Span<MVert> surface_verts_eval_;
Span<MLoop> surface_loops_eval_;
Span<MLoopTri> surface_looptris_eval_;
VArraySpan<float2> surface_uv_map_eval_;
@@ -138,7 +138,7 @@ struct AddOperationExecutor {
return;
}
surface_eval_ = BKE_object_get_evaluated_mesh(surface_ob_eval_);
- surface_vertices_eval_ = bke::mesh_vertices(*surface_eval_);
+ surface_verts_eval_ = bke::mesh_vertices(*surface_eval_);
surface_loops_eval_ = bke::mesh_loops(*surface_eval_);
surface_looptris_eval_ = {BKE_mesh_runtime_looptri_ensure(surface_eval_),
BKE_mesh_runtime_looptri_len(surface_eval_)};
@@ -298,7 +298,7 @@ struct AddOperationExecutor {
const MLoopTri &looptri = surface_looptris_eval_[looptri_index];
const float3 brush_pos_su = ray_hit.co;
const float3 bary_coords = bke::mesh_surface_sample::compute_bary_coord_in_triangle(
- surface_vertices_eval_, surface_loops_eval_, looptri, brush_pos_su);
+ surface_verts_eval_, surface_loops_eval_, looptri, brush_pos_su);
const float2 uv = bke::mesh_surface_sample::sample_corner_attrribute_with_bary_coords(
bary_coords, looptri, surface_uv_map_eval_);
@@ -423,9 +423,9 @@ struct AddOperationExecutor {
brush_radius_su,
[&](const int index, const float3 &UNUSED(co), const float UNUSED(dist_sq)) {
const MLoopTri &looptri = surface_looptris_eval_[index];
- const float3 v0_su = surface_vertices_eval_[surface_loops_eval_[looptri.tri[0]].v].co;
- const float3 v1_su = surface_vertices_eval_[surface_loops_eval_[looptri.tri[1]].v].co;
- const float3 v2_su = surface_vertices_eval_[surface_loops_eval_[looptri.tri[2]].v].co;
+ const float3 v0_su = surface_verts_eval_[surface_loops_eval_[looptri.tri[0]].v].co;
+ const float3 v1_su = surface_verts_eval_[surface_loops_eval_[looptri.tri[1]].v].co;
+ const float3 v2_su = surface_verts_eval_[surface_loops_eval_[looptri.tri[2]].v].co;
float3 normal_su;
normal_tri_v3(normal_su, v0_su, v1_su, v2_su);
if (math::dot(normal_su, view_direction_su) >= 0.0f) {
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_puff.cc b/source/blender/editors/sculpt_paint/curves_sculpt_puff.cc
index ea6226c5916..799ac450a15 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_puff.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_puff.cc
@@ -70,7 +70,7 @@ struct PuffOperationExecutor {
Object *surface_ob_ = nullptr;
Mesh *surface_ = nullptr;
- Span<MVert> surface_vertices_;
+ Span<MVert> surface_verts_;
Span<MLoop> surface_loops_;
Span<MLoopTri> surface_looptris_;
Span<float3> corner_normals_su_;
@@ -119,7 +119,7 @@ struct PuffOperationExecutor {
reinterpret_cast<const float3 *>(CustomData_get_layer(&surface_->ldata, CD_NORMAL)),
surface_->totloop};
- surface_vertices_ = bke::mesh_vertices(*surface_);
+ surface_verts_ = bke::mesh_vertices(*surface_);
surface_loops_ = bke::mesh_loops(*surface_);
surface_looptris_ = {BKE_mesh_runtime_looptri_ensure(surface_),
BKE_mesh_runtime_looptri_len(surface_)};
@@ -292,9 +292,9 @@ struct PuffOperationExecutor {
const MLoopTri &looptri = surface_looptris_[nearest.index];
const float3 closest_pos_su = nearest.co;
- const float3 &v0_su = surface_vertices_[surface_loops_[looptri.tri[0]].v].co;
- const float3 &v1_su = surface_vertices_[surface_loops_[looptri.tri[1]].v].co;
- const float3 &v2_su = surface_vertices_[surface_loops_[looptri.tri[2]].v].co;
+ const float3 &v0_su = surface_verts_[surface_loops_[looptri.tri[0]].v].co;
+ const float3 &v1_su = surface_verts_[surface_loops_[looptri.tri[1]].v].co;
+ const float3 &v2_su = surface_verts_[surface_loops_[looptri.tri[2]].v].co;
float3 bary_coords;
interp_weights_tri_v3(bary_coords, v0_su, v1_su, v2_su, closest_pos_su);
const float3 normal_su = geometry::compute_surface_point_normal(
diff --git a/source/blender/editors/sculpt_paint/curves_sculpt_slide.cc b/source/blender/editors/sculpt_paint/curves_sculpt_slide.cc
index ccb0bd69c51..664248e0904 100644
--- a/source/blender/editors/sculpt_paint/curves_sculpt_slide.cc
+++ b/source/blender/editors/sculpt_paint/curves_sculpt_slide.cc
@@ -112,7 +112,7 @@ struct SlideOperationExecutor {
Object *surface_ob_eval_ = nullptr;
Mesh *surface_eval_ = nullptr;
- Span<MVert> surface_vertices_eval_;
+ Span<MVert> surface_verts_eval_;
Span<MLoop> surface_loops_eval_;
Span<MLoopTri> surface_looptris_eval_;
VArraySpan<float2> surface_uv_map_eval_;
@@ -195,7 +195,7 @@ struct SlideOperationExecutor {
}
surface_looptris_eval_ = {BKE_mesh_runtime_looptri_ensure(surface_eval_),
BKE_mesh_runtime_looptri_len(surface_eval_)};
- surface_vertices_eval_ = bke::mesh_vertices(*surface_eval_);
+ surface_verts_eval_ = bke::mesh_vertices(*surface_eval_);
surface_loops_eval_ = bke::mesh_loops(*surface_eval_);
if (surface_eval_->totpoly == 0) {
report_empty_evaluated_surface(stroke_extension.reports);
@@ -380,7 +380,7 @@ struct SlideOperationExecutor {
/* Compute the uv of the new surface position on the evaluated mesh. */
const MLoopTri &looptri_eval = surface_looptris_eval_[looptri_index_eval];
const float3 bary_weights_eval = bke::mesh_surface_sample::compute_bary_coord_in_triangle(
- surface_vertices_eval_, surface_loops_eval_, looptri_eval, hit_pos_eval_su);
+ surface_verts_eval_, surface_loops_eval_, looptri_eval, hit_pos_eval_su);
const float2 uv = attribute_math::mix3(bary_weights_eval,
surface_uv_map_eval_[looptri_eval.tri[0]],
surface_uv_map_eval_[looptri_eval.tri[1]],
diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c
index de86597e223..34c5fc3124c 100644
--- a/source/blender/editors/sculpt_paint/paint_mask.c
+++ b/source/blender/editors/sculpt_paint/paint_mask.c
@@ -1123,7 +1123,7 @@ static void sculpt_gesture_trim_geometry_generate(SculptGestureContext *sgcontex
const float(*ob_imat)[4] = vc->obact->imat;
/* Write vertices coordinates for the front face. */
- MVert *vertices = BKE_mesh_vertices_for_write(trim_operation->mesh);
+ MVert *verts = BKE_mesh_vertices_for_write(trim_operation->mesh);
float depth_point[3];
madd_v3_v3v3fl(depth_point, shape_origin, shape_normal, depth_front);
for (int i = 0; i < tot_screen_points; i++) {
@@ -1135,7 +1135,7 @@ static void sculpt_gesture_trim_geometry_generate(SculptGestureContext *sgcontex
ED_view3d_win_to_3d_on_plane(region, shape_plane, screen_points[i], false, new_point);
madd_v3_v3fl(new_point, shape_normal, depth_front);
}
- mul_v3_m4v3(vertices[i].co, ob_imat, new_point);
+ mul_v3_m4v3(verts[i].co, ob_imat, new_point);
mul_v3_m4v3(trim_operation->true_mesh_co[i], ob_imat, new_point);
}
@@ -1150,7 +1150,7 @@ static void sculpt_gesture_trim_geometry_generate(SculptGestureContext *sgcontex
ED_view3d_win_to_3d_on_plane(region, shape_plane, screen_points[i], false, new_point);
madd_v3_v3fl(new_point, shape_normal, depth_back);
}
- mul_v3_m4v3(vertices[i + tot_screen_points].co, ob_imat, new_point);
+ mul_v3_m4v3(verts[i + tot_screen_points].co, ob_imat, new_point);
mul_v3_m4v3(trim_operation->true_mesh_co[i + tot_screen_points], ob_imat, new_point);
}
@@ -1160,9 +1160,9 @@ static void sculpt_gesture_trim_geometry_generate(SculptGestureContext *sgcontex
BLI_polyfill_calc(screen_points, tot_screen_points, 0, r_tris);
/* Write the front face triangle indices. */
- MPoly *polygons = BKE_mesh_polygons_for_write(trim_operation->mesh);
+ MPoly *polys = BKE_mesh_polygons_for_write(trim_operation->mesh);
MLoop *loops = BKE_mesh_loops_for_write(trim_operation->mesh);
- MPoly *mp = polygons;
+ MPoly *mp = polys;
MLoop *ml = loops;
for (int i = 0; i < tot_tris_face; i++, mp++, ml += 3) {
mp->loopstart = (int)(ml - loops);
@@ -1333,9 +1333,9 @@ static void sculpt_gesture_trim_apply_for_symmetry_pass(bContext *UNUSED(C),
{
SculptGestureTrimOperation *trim_operation = (SculptGestureTrimOperation *)sgcontext->operation;
Mesh *trim_mesh = trim_operation->mesh;
- MVert *vertices = BKE_mesh_vertices_for_write(trim_mesh);
+ MVert *verts = BKE_mesh_vertices_for_write(trim_mesh);
for (int i = 0; i < trim_mesh->totvert; i++) {
- flip_v3_v3(vertices[i].co, trim_operation->true_mesh_co[i], sgcontext->symmpass);
+ flip_v3_v3(verts[i].co, trim_operation->true_mesh_co[i], sgcontext->symmpass);
}
sculpt_gesture_trim_normals_update(sgcontext);
sculpt_gesture_apply_trim(sgcontext);
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 4f43c3069a0..f908993bf28 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -411,7 +411,7 @@ void paint_sample_color(
cddata_masks.pmask |= CD_MASK_ORIGINDEX;
Mesh *me = (Mesh *)ob->data;
Mesh *me_eval = mesh_get_eval_final(depsgraph, scene, ob_eval, &cddata_masks);
- const MPoly *polygons_eval = BKE_mesh_polygons(me_eval);
+ const MPoly *polys_eval = BKE_mesh_polygons(me_eval);
ViewContext vc;
const int mval[2] = {x, y};
@@ -429,7 +429,7 @@ void paint_sample_color(
if (use_material) {
/* Image and texture interpolation from material. */
- const MPoly *mp = polygons_eval + faceindex;
+ const MPoly *mp = polys_eval + faceindex;
Material *ma = BKE_object_material_get(ob_eval, mp->mat_nr + 1);
/* Force refresh since paint slots are not updated when changing interpolation. */
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.cc b/source/blender/editors/sculpt_paint/paint_vertex.cc
index c08857bff58..aacced02e60 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex.cc
@@ -1237,7 +1237,7 @@ static void vertex_paint_init_session_data(const ToolSettings *ts, Object *ob)
}
Mesh *me = (Mesh *)ob->data;
- const Span<MPoly> polygons = blender::bke::mesh_polygons(*me);
+ const Span<MPoly> polys = blender::bke::mesh_polygons(*me);
const Span<MLoop> loops = bke::mesh_loops(*me);
if (gmap->vert_to_loop == nullptr) {
@@ -1247,14 +1247,14 @@ static void vertex_paint_init_session_data(const ToolSettings *ts, Object *ob)
gmap->vert_to_poly = nullptr;
BKE_mesh_vert_loop_map_create(&gmap->vert_to_loop,
&gmap->vert_map_mem,
- polygons.data(),
+ polys.data(),
loops.data(),
me->totvert,
me->totpoly,
me->totloop);
BKE_mesh_vert_poly_map_create(&gmap->vert_to_poly,
&gmap->poly_map_mem,
- polygons.data(),
+ polys.data(),
loops.data(),
me->totvert,
me->totpoly,
@@ -4088,12 +4088,12 @@ static bool vertex_color_set(Object *ob, ColorPaint4f paintcol_in, CustomDataLay
}
else {
Color *color_layer = static_cast<Color *>(layer->data);
- const Span<MVert> vertices = blender::bke::mesh_vertices(*me);
- const Span<MPoly> polygons = blender::bke::mesh_polygons(*me);
+ const Span<MVert> verts = blender::bke::mesh_vertices(*me);
+ const Span<MPoly> polys = blender::bke::mesh_polygons(*me);
const Span<MLoop> loops = blender::bke::mesh_loops(*me);
- for (const int i : polygons.index_range()) {
- const MPoly &poly = polygons[i];
+ for (const int i : polys.index_range()) {
+ const MPoly &poly = polys[i];
if (use_face_sel && !(poly.flag & ME_FACE_SEL)) {
continue;
}
@@ -4102,7 +4102,7 @@ static bool vertex_color_set(Object *ob, ColorPaint4f paintcol_in, CustomDataLay
do {
uint vidx = loops[poly.loopstart + j].v;
- if (!(use_vert_sel && !(vertices[vidx].flag & SELECT))) {
+ if (!(use_vert_sel && !(verts[vidx].flag & SELECT))) {
if constexpr (domain == ATTR_DOMAIN_CORNER) {
color_layer[poly.loopstart + j] = paintcol;
}
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
index 21b778e9cfd..dcdeba84b2b 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
+++ b/source/blender/editors/sculpt_paint/paint_vertex_color_ops.cc
@@ -159,15 +159,15 @@ static IndexMask get_selected_indices(const Mesh &mesh,
Vector<int64_t> &indices)
{
using namespace blender;
- Span<MVert> vertices = bke::mesh_vertices(mesh);
- Span<MPoly> polygons = bke::mesh_polygons(mesh);
+ Span<MVert> verts = bke::mesh_vertices(mesh);
+ Span<MPoly> polys = bke::mesh_polygons(mesh);
bke::AttributeAccessor attributes = bke::mesh_attributes(mesh);
if (mesh.editflag & ME_EDIT_PAINT_FACE_SEL) {
const VArray<bool> selection = attributes.adapt_domain(
- VArray<bool>::ForFunc(polygons.size(),
- [&](const int i) { return polygons[i].flag & ME_FACE_SEL; }),
+ VArray<bool>::ForFunc(polys.size(),
+ [&](const int i) { return polys[i].flag & ME_FACE_SEL; }),
ATTR_DOMAIN_FACE,
domain);
@@ -176,8 +176,7 @@ static IndexMask get_selected_indices(const Mesh &mesh,
}
if (mesh.editflag & ME_EDIT_PAINT_VERT_SEL) {
const VArray<bool> selection = attributes.adapt_domain(
- VArray<bool>::ForFunc(vertices.size(),
- [&](const int i) { return vertices[i].flag & SELECT; }),
+ VArray<bool>::ForFunc(verts.size(), [&](const int i) { return verts[i].flag & SELECT; }),
ATTR_DOMAIN_POINT,
domain);
diff --git a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
index 3daf6b3b7a4..f40a287adf6 100644
--- a/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
+++ b/source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
@@ -317,7 +317,7 @@ static const EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C,
ED_view3d_viewcontext_init(C, &vc, depsgraph);
me = BKE_mesh_from_object(vc.obact);
- const MPoly *polygons = BKE_mesh_polygons(me);
+ const MPoly *polys = BKE_mesh_polygons(me);
const MLoop *loops = BKE_mesh_loops(me);
const MDeformVert *dverts = BKE_mesh_deform_verts(me);
@@ -344,7 +344,7 @@ static const EnumPropertyItem *weight_paint_sample_enum_itemf(bContext *C,
}
else {
if (ED_mesh_pick_face(C, vc.obact, mval, ED_MESH_PICK_DEFAULT_FACE_DIST, &index)) {
- const MPoly *mp = &polygons[index];
+ const MPoly *mp = &polys[index];
uint fidx = mp->totloop - 1;
do {
@@ -445,8 +445,8 @@ static bool weight_paint_set(Object *ob, float paintweight)
/* mutually exclusive, could be made into a */
const short paint_selmode = ME_EDIT_PAINT_SEL_MODE(me);
- const MVert *vertices = BKE_mesh_vertices(me);
- const MPoly *polygons = BKE_mesh_polygons(me);
+ const MVert *verts = BKE_mesh_vertices(me);
+ const MPoly *polys = BKE_mesh_polygons(me);
const MLoop *loops = BKE_mesh_loops(me);
MDeformVert *dvert = BKE_mesh_deform_verts_for_write(me);
@@ -464,7 +464,7 @@ static bool weight_paint_set(Object *ob, float paintweight)
struct WPaintPrev wpp;
wpaint_prev_create(&wpp, dvert, me->totvert);
- for (index = 0, mp = polygons; index < me->totpoly; index++, mp++) {
+ for (index = 0, mp = polys; index < me->totpoly; index++, mp++) {
uint fidx = mp->totloop - 1;
if ((paint_selmode == SCE_SELECT_FACE) && !(mp->flag & ME_FACE_SEL)) {
@@ -475,7 +475,7 @@ static bool weight_paint_set(Object *ob, float paintweight)
uint vidx = loops[mp->loopstart + fidx].v;
if (!dvert[vidx].flag) {
- if ((paint_selmode == SCE_SELECT_VERTEX) && !(vertices[vidx].flag & SELECT)) {
+ if ((paint_selmode == SCE_SELECT_VERTEX) && !(verts[vidx].flag & SELECT)) {
continue;
}
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index c3ba29295c7..74fd2f904e5 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -65,7 +65,7 @@
#include "IMB_colormanagement.h"
#include "WM_api.h"
-// #include "WM_message.h"
+#include "WM_message.h"
#include "WM_toolsystem.h"
#include "WM_types.h"
@@ -3162,10 +3162,10 @@ void SCULPT_vertcos_to_key(Object *ob, KeyBlock *kb, const float (*vertCos)[3])
/* Modifying of basis key should update mesh. */
if (kb == me->key->refkey) {
- MVert *vertices = BKE_mesh_vertices_for_write(me);
+ MVert *verts = BKE_mesh_vertices_for_write(me);
for (a = 0; a < me->totvert; a++) {
- copy_v3_v3(vertices[a].co, vertCos[a]);
+ copy_v3_v3(verts[a].co, vertCos[a]);
}
BKE_mesh_tag_coords_changed(me);
}
@@ -3589,9 +3589,9 @@ static void sculpt_flush_pbvhvert_deform(Object *ob, PBVHVertexIter *vd)
copy_v3_v3(ss->deform_cos[index], vd->co);
copy_v3_v3(ss->orig_cos[index], newco);
- MVert *vertices = BKE_mesh_vertices_for_write(me);
+ MVert *verts = BKE_mesh_vertices_for_write(me);
if (!ss->shapekey_active) {
- copy_v3_v3(vertices[index].co, newco);
+ copy_v3_v3(verts[index].co, newco);
}
}
@@ -5910,7 +5910,7 @@ void SCULPT_boundary_info_ensure(Object *object)
Mesh *base_mesh = BKE_mesh_from_object(object);
const MEdge *edges = BKE_mesh_edges(base_mesh);
- const MPoly *polygons = BKE_mesh_polygons(base_mesh);
+ const MPoly *polys = BKE_mesh_polygons(base_mesh);
const MLoop *loops = BKE_mesh_loops(base_mesh);
ss->vertex_info.boundary = BLI_BITMAP_NEW(base_mesh->totvert, "Boundary info");
@@ -5918,7 +5918,7 @@ void SCULPT_boundary_info_ensure(Object *object)
base_mesh->totedge, sizeof(int), "Adjacent face edge count");
for (int p = 0; p < base_mesh->totpoly; p++) {
- const MPoly *poly = &polygons[p];
+ const MPoly *poly = &polys[p];
for (int l = 0; l < poly->totloop; l++) {
const MLoop *loop = &loops[l + poly->loopstart];
adjacent_faces_edge_count[loop->e]++;
diff --git a/source/blender/editors/sculpt_paint/sculpt_expand.c b/source/blender/editors/sculpt_paint/sculpt_expand.c
index d4b2b884905..63d5c14a931 100644
--- a/source/blender/editors/sculpt_paint/sculpt_expand.c
+++ b/source/blender/editors/sculpt_paint/sculpt_expand.c
@@ -776,11 +776,11 @@ static void sculpt_expand_grids_to_faces_falloff(SculptSession *ss,
Mesh *mesh,
ExpandCache *expand_cache)
{
- const MPoly *polygons = BKE_mesh_polygons(mesh);
+ const MPoly *polys = BKE_mesh_polygons(mesh);
const CCGKey *key = BKE_pbvh_get_grid_key(ss->pbvh);
for (int p = 0; p < mesh->totpoly; p++) {
- const MPoly *poly = &polygons[p];
+ const MPoly *poly = &polys[p];
float accum = 0.0f;
for (int l = 0; l < poly->totloop; l++) {
const int grid_loop_index = (poly->loopstart + l) * key->grid_area;
@@ -794,11 +794,11 @@ static void sculpt_expand_grids_to_faces_falloff(SculptSession *ss,
static void sculpt_expand_vertex_to_faces_falloff(Mesh *mesh, ExpandCache *expand_cache)
{
- const MPoly *polygons = BKE_mesh_polygons(mesh);
+ const MPoly *polys = BKE_mesh_polygons(mesh);
const MLoop *loops = BKE_mesh_loops(mesh);
for (int p = 0; p < mesh->totpoly; p++) {
- const MPoly *poly = &polygons[p];
+ const MPoly *poly = &polys[p];
float accum = 0.0f;
for (int l = 0; l < poly->totloop; l++) {
const MLoop *loop = &loops[l + poly->loopstart];
@@ -1940,7 +1940,7 @@ static void sculpt_expand_delete_face_set_id(int *r_face_sets,
{
const int totface = ss->totfaces;
MeshElemMap *pmap = ss->pmap;
- const MPoly *polygons = BKE_mesh_polygons(mesh);
+ const MPoly *polys = BKE_mesh_polygons(mesh);
const MLoop *loops = BKE_mesh_loops(mesh);
/* Check that all the face sets IDs in the mesh are not equal to `delete_id`
@@ -1976,7 +1976,7 @@ static void sculpt_expand_delete_face_set_id(int *r_face_sets,
while (BLI_LINKSTACK_SIZE(queue)) {
const int f_index = POINTER_AS_INT(BLI_LINKSTACK_POP(queue));
int other_id = delete_id;
- const MPoly *c_poly = &polygons[f_index];
+ const MPoly *c_poly = &polys[f_index];
for (int l = 0; l < c_poly->totloop; l++) {
const MLoop *c_loop = &loops[c_poly->loopstart + l];
const MeshElemMap *vert_map = &pmap[c_loop->v];
diff --git a/source/blender/editors/sculpt_paint/sculpt_face_set.c b/source/blender/editors/sculpt_paint/sculpt_face_set.c
index 684cebd0d3a..c8e546ecef3 100644
--- a/source/blender/editors/sculpt_paint/sculpt_face_set.c
+++ b/source/blender/editors/sculpt_paint/sculpt_face_set.c
@@ -1096,14 +1096,14 @@ static void sculpt_face_set_grow(Object *ob,
const bool modify_hidden)
{
Mesh *mesh = BKE_mesh_from_object(ob);
- const MPoly *polygons = BKE_mesh_polygons(mesh);
+ const MPoly *polys = BKE_mesh_polygons(mesh);
const MLoop *loops = BKE_mesh_loops(mesh);
for (int p = 0; p < mesh->totpoly; p++) {
if (!modify_hidden && prev_face_sets[p] <= 0) {
continue;
}
- const MPoly *c_poly = &polygons[p];
+ const MPoly *c_poly = &polys[p];
for (int l = 0; l < c_poly->totloop; l++) {
const MLoop *c_loop = &loops[c_poly->loopstart + l];
const MeshElemMap *vert_map = &ss->pmap[c_loop->v];
@@ -1127,14 +1127,14 @@ static void sculpt_face_set_shrink(Object *ob,
const bool modify_hidden)
{
Mesh *mesh = BKE_mesh_from_object(ob);
- const MPoly *polygons = BKE_mesh_polygons(mesh);
+ const MPoly *polys = BKE_mesh_polygons(mesh);
const MLoop *loops = BKE_mesh_loops(mesh);
for (int p = 0; p < mesh->totpoly; p++) {
if (!modify_hidden && prev_face_sets[p] <= 0) {
continue;
}
if (abs(prev_face_sets[p]) == active_face_set_id) {
- const MPoly *c_poly = &polygons[p];
+ const MPoly *c_poly = &polys[p];
for (int l = 0; l < c_poly->totloop; l++) {
const MLoop *c_loop = &loops[c_poly->loopstart + l];
const MeshElemMap *vert_map = &ss->pmap[c_loop->v];
diff --git a/source/blender/editors/sculpt_paint/sculpt_geodesic.c b/source/blender/editors/sculpt_paint/sculpt_geodesic.c
index 4874f41462d..4b871da1d02 100644
--- a/source/blender/editors/sculpt_paint/sculpt_geodesic.c
+++ b/source/blender/editors/sculpt_paint/sculpt_geodesic.c
@@ -109,7 +109,7 @@ static float *SCULPT_geodesic_mesh_create(Object *ob,
MVert *verts = SCULPT_mesh_deformed_mverts_get(ss);
const MEdge *edges = BKE_mesh_edges(mesh);
- const MPoly *polygons = BKE_mesh_polygons(mesh);
+ const MPoly *polys = BKE_mesh_polygons(mesh);
const MLoop *loops = BKE_mesh_loops(mesh);
float *dists = MEM_malloc_arrayN(totvert, sizeof(float), "distances");
@@ -120,7 +120,7 @@ static float *SCULPT_geodesic_mesh_create(Object *ob,
&ss->epmap_mem,
edges,
mesh->totedge,
- polygons,
+ polys,
mesh->totpoly,
loops,
mesh->totloop);
@@ -202,7 +202,7 @@ static float *SCULPT_geodesic_mesh_create(Object *ob,
if (ss->face_sets[poly] <= 0) {
continue;
}
- const MPoly *mpoly = &polygons[poly];
+ const MPoly *mpoly = &polys[poly];
for (int loop_index = 0; loop_index < mpoly->totloop; loop_index++) {
const MLoop *mloop = &loops[loop_index + mpoly->loopstart];