Cleanup: format

This commit is contained in:
Chris Blackbourn
2023-03-02 16:23:17 +13:00
parent 52d20c6a0e
commit fcaf12f07a
7 changed files with 18 additions and 10 deletions

View File

@@ -153,8 +153,7 @@ void old_mdisps_bilinear(float out[3], float (*disps)[3], int st, float u, float
/**
* Find per-corner coordinate with given per-face UV coord.
*/
int mdisp_rot_face_to_crn(
struct MPoly *poly, int face_side, float u, float v, float *x, float *y);
int mdisp_rot_face_to_crn(struct MPoly *poly, int face_side, float u, float v, float *x, float *y);
/* Reshaping, define in multires_reshape.cc */

View File

@@ -95,7 +95,8 @@ static void pbvh_vertex_color_get(const PBVH &pbvh, PBVHVertRef vertex, float r_
zero_v4(r_color);
for (const int i_poly : Span(melem.indices, melem.count)) {
const MPoly &poly = pbvh.polys[i_poly];
Span<T> colors{static_cast<const T *>(pbvh.color_layer->data) + poly.loopstart, poly.totloop};
Span<T> colors{static_cast<const T *>(pbvh.color_layer->data) + poly.loopstart,
poly.totloop};
Span<MLoop> loops{pbvh.mloop + poly.loopstart, poly.totloop};
for (const int i_loop : IndexRange(poly.totloop)) {
@@ -128,7 +129,8 @@ static void pbvh_vertex_color_set(PBVH &pbvh, PBVHVertRef vertex, const float co
for (const int i_poly : Span(melem.indices, melem.count)) {
const MPoly &poly = pbvh.polys[i_poly];
MutableSpan<T> colors{static_cast<T *>(pbvh.color_layer->data) + poly.loopstart, poly.totloop};
MutableSpan<T> colors{static_cast<T *>(pbvh.color_layer->data) + poly.loopstart,
poly.totloop};
Span<MLoop> loops{pbvh.mloop + poly.loopstart, poly.totloop};
for (const int i_loop : IndexRange(poly.totloop)) {

View File

@@ -574,8 +574,12 @@ static void ss_sync_ccg_from_derivedmesh(CCGSubSurf *ss,
crease = useFlatSubdiv ? creaseFactor : (creases ? creases[i] * creaseFactor : 0.0f);
ccgSubSurf_syncEdge(
ss, POINTER_FROM_INT(i), POINTER_FROM_UINT(edge->v1), POINTER_FROM_UINT(edge->v2), crease, &e);
ccgSubSurf_syncEdge(ss,
POINTER_FROM_INT(i),
POINTER_FROM_UINT(edge->v1),
POINTER_FROM_UINT(edge->v2),
crease,
&e);
((int *)ccgSubSurf_getEdgeUserData(ss, e))[1] = (index) ? *index++ : i;
}

View File

@@ -346,7 +346,8 @@ struct PBVHBatches {
if (!(poly->flag & ME_SMOOTH)) {
smooth = true;
BKE_mesh_calc_poly_normal(poly, args->mloop + poly->loopstart, args->vert_positions, fno);
BKE_mesh_calc_poly_normal(
poly, args->mloop + poly->loopstart, args->vert_positions, fno);
normal_float_to_short_v3(no, fno);
}
else {

View File

@@ -411,7 +411,8 @@ enum {
#define ME_POLY_LOOP_PREV(mloop, poly, i) \
(&(mloop)[(poly)->loopstart + (((i) + (poly)->totloop - 1) % (poly)->totloop)])
#define ME_POLY_LOOP_NEXT(mloop, poly, i) (&(mloop)[(poly)->loopstart + (((i) + 1) % (poly)->totloop)])
#define ME_POLY_LOOP_NEXT(mloop, poly, i) \
(&(mloop)[(poly)->loopstart + (((i) + 1) % (poly)->totloop)])
/** Number of tri's that make up this polygon once tessellated. */
#define ME_POLY_TRI_TOT(poly) ((poly)->totloop - 2)

View File

@@ -107,7 +107,7 @@ static void smoothModifier_do(
memset(accumulated_vecs_count, 0, sizeof(*accumulated_vecs_count) * (size_t)verts_num);
}
for (const int i : edges.index_range()) {
for (const int i : edges.index_range()) {
float fvec[3];
const uint idx1 = edges[i].v1;
const uint idx2 = edges[i].v2;

View File

@@ -1800,7 +1800,8 @@ Mesh *MOD_solidify_nonmanifold_modifyMesh(ModifierData *md,
int k;
for (k = 1; k + 1 < g->edges_len; k++, edge_ptr++) {
const MEdge *edge = &orig_edges[(*edge_ptr)->old_edge];
sub_v3_v3v3(tmp, orig_mvert_co[vm[edge->v1] == i ? edge->v2 : edge->v1], orig_mvert_co[i]);
sub_v3_v3v3(
tmp, orig_mvert_co[vm[edge->v1] == i ? edge->v2 : edge->v1], orig_mvert_co[i]);
add_v3_v3(move_nor, tmp);
}
if (k == 1) {