diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-01 16:48:00 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2018-11-01 17:20:50 +0300 |
commit | c2aa8d03f26ceb2700730e5aeb2c72ccfa969116 (patch) | |
tree | a101f5b6c006c3371b9ee2e26fb58939d33ab847 /source/blender/blenkernel | |
parent | 34ec716352a96fa967a8fa656fec3cad8b2e4a99 (diff) |
Subdiv: Cleanup. better naming
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/multires_reshape.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/source/blender/blenkernel/intern/multires_reshape.c b/source/blender/blenkernel/intern/multires_reshape.c index ddbd6e45626..d99e8486738 100644 --- a/source/blender/blenkernel/intern/multires_reshape.c +++ b/source/blender/blenkernel/intern/multires_reshape.c @@ -141,9 +141,8 @@ typedef struct MultiresReshapeContext { const Mesh *coarse_mesh; MDisps *mdisps; GridPaintMask *grid_paint_mask; - /* NOTE: This is a grid size on the top level, same for level. */ - int grid_size; - int level; + int top_grid_size; + int top_level; } MultiresReshapeContext; static void multires_reshape_allocate_displacement_grid( @@ -218,7 +217,7 @@ static void multires_reshape_vertex_copy_to_next( const GridPaintMask *current_mask_grid, const int current_grid_x, const int current_grid_y) { - const int grid_size = ctx->grid_size; + const int grid_size = ctx->top_grid_size; const int next_current_corner = (current_corner + 1) % coarse_poly->totloop; const int next_grid_x = 0; const int next_grid_y = current_grid_x; @@ -249,7 +248,7 @@ static void multires_reshape_vertex_copy_to_prev( const GridPaintMask *current_mask_grid, const int current_grid_x, const int current_grid_y) { - const int grid_size = ctx->grid_size; + const int grid_size = ctx->top_grid_size; const int prev_current_corner = (current_corner - 1 + coarse_poly->totloop) % coarse_poly->totloop; const int prev_grid_x = current_grid_y; @@ -328,7 +327,7 @@ static void multires_reshape_vertex_from_final_data( const float final_P[3], const float final_mask) { Subdiv *subdiv = ctx->subdiv; - const int grid_size = ctx->grid_size; + const int grid_size = ctx->top_grid_size; const Mesh *coarse_mesh = ctx->coarse_mesh; const MPoly *coarse_mpoly = coarse_mesh->mpoly; const MPoly *coarse_poly = &coarse_mpoly[coarse_poly_index]; @@ -808,8 +807,8 @@ static bool multires_reshape_from_vertcos( .coarse_mesh = coarse_mesh, .mdisps = mdisps, .grid_paint_mask = NULL, - .grid_size = BKE_subdiv_grid_size_from_level(top_level), - .level = top_level, + .top_grid_size = BKE_subdiv_grid_size_from_level(top_level), + .top_level = top_level, }, .deformed_verts = deformed_verts, .num_deformed_verts = num_deformed_verts, @@ -1100,8 +1099,8 @@ bool multiresModifier_reshapeFromCCG( .coarse_mesh = coarse_mesh, .mdisps = mdisps, .grid_paint_mask = grid_paint_mask, - .grid_size = BKE_subdiv_grid_size_from_level(top_level), - .level = top_level}, + .top_grid_size = BKE_subdiv_grid_size_from_level(top_level), + .top_level = top_level}, .face_ptex_offset = BKE_subdiv_face_ptex_offset_get(subdiv), .key = &key, .grids = subdiv_ccg->grids}; |