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-09-28 07:04:21 +0300
committerHans Goudey <h.goudey@me.com>2022-09-28 07:04:21 +0300
commitc4b7ffa6f50c9680059fd221b5d7391fae6e6f29 (patch)
tree431834a347a5cab1347ff92eb7290a8cebe04079 /source/blender/blenkernel/intern/mesh_convert.cc
parent0f36ad24b5031f78664a935a3c483751e173e308 (diff)
parent788f3d72cf89c0301721a5eb2a72da07058dfa24 (diff)
Merge branch 'master' into refactor-mesh-position-generic
Diffstat (limited to 'source/blender/blenkernel/intern/mesh_convert.cc')
-rw-r--r--source/blender/blenkernel/intern/mesh_convert.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/mesh_convert.cc b/source/blender/blenkernel/intern/mesh_convert.cc
index 5c6f2d0c53b..b981585f230 100644
--- a/source/blender/blenkernel/intern/mesh_convert.cc
+++ b/source/blender/blenkernel/intern/mesh_convert.cc
@@ -270,13 +270,13 @@ static Mesh *mesh_nurbs_displist_to_mesh(const Curve *cu, const ListBase *dispba
mloop[0].v = startvert + index[0];
mloop[1].v = startvert + index[2];
mloop[2].v = startvert + index[1];
- mpoly->loopstart = (int)(mloop - loops.data());
+ mpoly->loopstart = int(mloop - loops.data());
mpoly->totloop = 3;
material_indices.span[mpoly - polys.data()] = dl->col;
if (mloopuv) {
for (int i = 0; i < 3; i++, mloopuv++) {
- mloopuv->uv[0] = (mloop[i].v - startvert) / (float)(dl->nr - 1);
+ mloopuv->uv[0] = (mloop[i].v - startvert) / float(dl->nr - 1);
mloopuv->uv[1] = 0.0f;
}
}
@@ -329,7 +329,7 @@ static Mesh *mesh_nurbs_displist_to_mesh(const Curve *cu, const ListBase *dispba
mloop[1].v = p3;
mloop[2].v = p4;
mloop[3].v = p2;
- mpoly->loopstart = (int)(mloop - loops.data());
+ mpoly->loopstart = int(mloop - loops.data());
mpoly->totloop = 4;
material_indices.span[mpoly - polys.data()] = dl->col;
@@ -352,14 +352,14 @@ static Mesh *mesh_nurbs_displist_to_mesh(const Curve *cu, const ListBase *dispba
/* find uv based on vertex index into grid array */
int v = mloop[i].v - startvert;
- mloopuv->uv[0] = (v / dl->nr) / (float)orco_sizev;
- mloopuv->uv[1] = (v % dl->nr) / (float)orco_sizeu;
+ mloopuv->uv[0] = (v / dl->nr) / float(orco_sizev);
+ mloopuv->uv[1] = (v % dl->nr) / float(orco_sizeu);
/* cyclic correction */
- if ((ELEM(i, 1, 2)) && mloopuv->uv[0] == 0.0f) {
+ if (ELEM(i, 1, 2) && mloopuv->uv[0] == 0.0f) {
mloopuv->uv[0] = 1.0f;
}
- if ((ELEM(i, 0, 1)) && mloopuv->uv[1] == 0.0f) {
+ if (ELEM(i, 0, 1) && mloopuv->uv[1] == 0.0f) {
mloopuv->uv[1] = 1.0f;
}
}
@@ -1111,11 +1111,11 @@ static void add_shapekey_layers(Mesh *mesh_dest, Mesh *mesh_src)
mesh_src->totvert,
kb->name,
kb->totelem);
- array = (float *)MEM_calloc_arrayN((size_t)mesh_src->totvert, sizeof(float[3]), __func__);
+ array = (float *)MEM_calloc_arrayN(size_t(mesh_src->totvert), sizeof(float[3]), __func__);
}
else {
- array = (float *)MEM_malloc_arrayN((size_t)mesh_src->totvert, sizeof(float[3]), __func__);
- memcpy(array, kb->data, sizeof(float[3]) * (size_t)mesh_src->totvert);
+ array = (float *)MEM_malloc_arrayN(size_t(mesh_src->totvert), sizeof(float[3]), __func__);
+ memcpy(array, kb->data, sizeof(float[3]) * size_t(mesh_src->totvert));
}
CustomData_add_layer_named(