diff options
-rw-r--r-- | source/blender/blenkernel/BKE_multires.h | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/multires.c | 2 | ||||
-rw-r--r-- | source/blender/blenkernel/intern/multires_reshape.c | 8 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/BKE_multires.h b/source/blender/blenkernel/BKE_multires.h index 2a9f5b3b7a7..28a98768a06 100644 --- a/source/blender/blenkernel/BKE_multires.h +++ b/source/blender/blenkernel/BKE_multires.h @@ -129,7 +129,7 @@ bool multiresModifier_reshapeFromDeformModifier( struct Object *ob, struct ModifierData *md); bool multiresModifier_reshapeFromCCG( - struct MultiresModifierData *mmd, + const int tot_level, struct Mesh *coarse_mesh, struct SubdivCCG *subdiv_ccg); diff --git a/source/blender/blenkernel/intern/multires.c b/source/blender/blenkernel/intern/multires.c index 7ab1bcb1fb5..3f3feddcfbe 100644 --- a/source/blender/blenkernel/intern/multires.c +++ b/source/blender/blenkernel/intern/multires.c @@ -428,7 +428,7 @@ void multires_force_update(Object *ob) if (BKE_pbvh_type(pbvh) == PBVH_GRIDS) { Mesh *mesh = ob->data; multiresModifier_reshapeFromCCG( - sculpt_session->multires, mesh, sculpt_session->subdiv_ccg); + sculpt_session->multires->totlvl, mesh, sculpt_session->subdiv_ccg); } else { /* NOTE: Disabled for until OpenSubdiv is enabled by default. */ diff --git a/source/blender/blenkernel/intern/multires_reshape.c b/source/blender/blenkernel/intern/multires_reshape.c index 20deb788194..bd0ea935b76 100644 --- a/source/blender/blenkernel/intern/multires_reshape.c +++ b/source/blender/blenkernel/intern/multires_reshape.c @@ -1069,7 +1069,7 @@ static void reshape_from_ccg_task( } bool multiresModifier_reshapeFromCCG( - MultiresModifierData *mmd, + const int tot_level, Mesh *coarse_mesh, SubdivCCG *subdiv_ccg) { @@ -1091,8 +1091,8 @@ bool multiresModifier_reshapeFromCCG( .mdisps = mdisps, .grid_paint_mask = grid_paint_mask, /* TODO(sergey): Use grid_size_for_level_get */ - .grid_size = (1 << (mmd->totlvl - 1)) + 1, - .level = mmd->totlvl}, + .grid_size = (1 << (tot_level - 1)) + 1, + .level = tot_level}, .face_ptex_offset = BKE_subdiv_face_ptex_offset_get(subdiv), .key = &key, .grids = subdiv_ccg->grids}; @@ -1101,7 +1101,7 @@ bool multiresModifier_reshapeFromCCG( /* Initialize propagation to higher levels. */ MultiresPropagateData propagate_data; multires_reshape_propagate_prepare( - &propagate_data, coarse_mesh, key.level, mmd->totlvl); + &propagate_data, coarse_mesh, key.level, tot_level); /* Threaded grids iteration. */ ParallelRangeSettings parallel_range_settings; BLI_parallel_range_settings_defaults(¶llel_range_settings); |