From 9df1e54079344ed4e2becef9e57cf1b925b46dff Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Thu, 19 Jul 2018 16:06:37 +1000 Subject: Cleanup: style --- .../blender/blenkernel/intern/subdiv_converter.h | 6 ++-- source/blender/blenkernel/intern/subdiv_mesh.c | 32 ++++++++++++---------- 2 files changed, 21 insertions(+), 17 deletions(-) (limited to 'source/blender/blenkernel') diff --git a/source/blender/blenkernel/intern/subdiv_converter.h b/source/blender/blenkernel/intern/subdiv_converter.h index 748d97f4178..4c552a9164e 100644 --- a/source/blender/blenkernel/intern/subdiv_converter.h +++ b/source/blender/blenkernel/intern/subdiv_converter.h @@ -23,8 +23,8 @@ * ***** END GPL LICENSE BLOCK ***** */ -#ifndef __BKE_SUBDIV_CONVERTER_H__ -#define __BKE_SUBDIV_CONVERTER_H__ +#ifndef __SUBDIV_CONVERTER_H__ +#define __SUBDIV_CONVERTER_H__ #include "BKE_subdiv.h" @@ -54,4 +54,4 @@ void BKE_subdiv_converter_free(struct OpenSubdiv_Converter *converter); int BKE_subdiv_converter_fvar_linear_from_settings( const SubdivSettings *settings); -#endif /* __BKE_SUBDIV_CONVERTER_H__ */ +#endif /* __SUBDIV_CONVERTER_H__ */ diff --git a/source/blender/blenkernel/intern/subdiv_mesh.c b/source/blender/blenkernel/intern/subdiv_mesh.c index 8a58605ba19..c2a10483e26 100644 --- a/source/blender/blenkernel/intern/subdiv_mesh.c +++ b/source/blender/blenkernel/intern/subdiv_mesh.c @@ -152,7 +152,7 @@ static void edges_of_ptex_get( typedef struct VerticesForInterpolation { /* This field points to a vertex data which is to be used for interpolation. * The idea is to avoid unnecessary allocations for regular faces, where - * we can simply + * we can simply */ const CustomData *vertex_data; /* Vertices data calculated for ptex corners. There are always 4 elements @@ -176,7 +176,7 @@ typedef struct VerticesForInterpolation { static void vertex_interpolation_init( const SubdivMeshContext *ctx, VerticesForInterpolation *vertex_interpolation, - const MPoly *coarse_poly) + const MPoly *coarse_poly) { const Mesh *coarse_mesh = ctx->coarse_mesh; const MLoop *coarse_mloop = coarse_mesh->mloop; @@ -234,7 +234,8 @@ static void vertex_interpolation_from_ptex( { if (coarse_poly->totloop == 4) { /* Nothing to do, all indices and data is already assigned. */ - } else { + } + else { const CustomData *vertex_data = &ctx->coarse_mesh->vdata; const Mesh *coarse_mesh = ctx->coarse_mesh; const MLoop *coarse_mloop = coarse_mesh->mloop; @@ -287,7 +288,7 @@ static void vertex_interpolation_end( typedef struct LoopsForInterpolation { /* This field points to a loop data which is to be used for interpolation. * The idea is to avoid unnecessary allocations for regular faces, where - * we can simply + * we can simply */ const CustomData *loop_data; /* Loops data calculated for ptex corners. There are always 4 elements @@ -311,7 +312,7 @@ typedef struct LoopsForInterpolation { static void loop_interpolation_init( const SubdivMeshContext *ctx, LoopsForInterpolation *loop_interpolation, - const MPoly *coarse_poly) + const MPoly *coarse_poly) { const Mesh *coarse_mesh = ctx->coarse_mesh; if (coarse_poly->totloop == 4) { @@ -363,7 +364,8 @@ static void loop_interpolation_from_ptex( { if (coarse_poly->totloop == 4) { /* Nothing to do, all indices and data is already assigned. */ - } else { + } + else { const CustomData *loop_data = &ctx->coarse_mesh->ldata; const Mesh *coarse_mesh = ctx->coarse_mesh; const MLoop *coarse_mloop = coarse_mesh->mloop; @@ -481,9 +483,10 @@ static void subdiv_evaluate_vertices(SubdivMeshContext *ctx, vertex_interpolation_end(&vertex_interpolation); } -static void subdiv_copy_edge_data(SubdivMeshContext *ctx, - MEdge *subdiv_edge, - const MEdge *coarse_edge) +static void subdiv_copy_edge_data( + SubdivMeshContext *ctx, + MEdge *subdiv_edge, + const MEdge *coarse_edge) { if (coarse_edge == NULL) { subdiv_edge->crease = 0; @@ -586,11 +589,12 @@ static void subdiv_create_edges(SubdivMeshContext *ctx, int poly_index) EdgesOfPtex edges_of_ptex; edges_of_ptex_get(ctx, &edges_of_ptex, coarse_poly, i); /* Create bottom row of edges (0-1, 1-2). */ - subdiv_edge = subdiv_create_edges_row(ctx, - subdiv_edge, - edges_of_ptex.first_edge, - start_ptex_face_vertex_index, - resolution); + subdiv_edge = subdiv_create_edges_row( + ctx, + subdiv_edge, + edges_of_ptex.first_edge, + start_ptex_face_vertex_index, + resolution); /* Create remaining edges. */ for (int row = 0; row < resolution - 1; row++) { const int start_row_vertex_index = -- cgit v1.2.3