Merge branch 'blender-v2.83-release'
This commit is contained in:
commit
ed32afd962
|
@ -202,7 +202,13 @@ void multiresModifier_subdivide_to_level(struct Object *object,
|
|||
multires_reshape_store_original_grids(&reshape_context);
|
||||
multires_reshape_ensure_grids(coarse_mesh, reshape_context.top.level);
|
||||
multires_reshape_assign_final_coords_from_orig_mdisps(&reshape_context);
|
||||
multires_reshape_smooth_object_grids(&reshape_context);
|
||||
|
||||
/* Free original grids which makes it so smoothing with details thinks all the details were
|
||||
* added against base mesh's limit surface. This is similar behavior to as if we've done all
|
||||
* displacement in sculpt mode at the old top level and then propagated to the new top level. */
|
||||
multires_reshape_free_original_grids(&reshape_context);
|
||||
|
||||
multires_reshape_smooth_object_grids_with_details(&reshape_context);
|
||||
multires_reshape_object_grids_to_tangent_displacement(&reshape_context);
|
||||
multires_reshape_context_free(&reshape_context);
|
||||
|
||||
|
|
|
@ -166,6 +166,7 @@ bool multires_reshape_context_create_from_subdivide(MultiresReshapeContext *resh
|
|||
struct MultiresModifierData *mmd,
|
||||
int top_level);
|
||||
|
||||
void multires_reshape_free_original_grids(MultiresReshapeContext *reshape_context);
|
||||
void multires_reshape_context_free(MultiresReshapeContext *reshape_context);
|
||||
|
||||
/* ================================================================================================
|
||||
|
|
|
@ -236,7 +236,7 @@ bool multires_reshape_context_create_from_subdivide(MultiresReshapeContext *resh
|
|||
return context_verify_or_free(reshape_context);
|
||||
}
|
||||
|
||||
static void free_original_grids(MultiresReshapeContext *reshape_context)
|
||||
void multires_reshape_free_original_grids(MultiresReshapeContext *reshape_context)
|
||||
{
|
||||
MDisps *orig_mdisps = reshape_context->orig.mdisps;
|
||||
GridPaintMask *orig_grid_paint_masks = reshape_context->orig.grid_paint_masks;
|
||||
|
@ -259,6 +259,9 @@ static void free_original_grids(MultiresReshapeContext *reshape_context)
|
|||
|
||||
MEM_SAFE_FREE(orig_mdisps);
|
||||
MEM_SAFE_FREE(orig_grid_paint_masks);
|
||||
|
||||
reshape_context->orig.mdisps = NULL;
|
||||
reshape_context->orig.grid_paint_masks = NULL;
|
||||
}
|
||||
|
||||
void multires_reshape_context_free(MultiresReshapeContext *reshape_context)
|
||||
|
@ -267,7 +270,7 @@ void multires_reshape_context_free(MultiresReshapeContext *reshape_context)
|
|||
BKE_subdiv_free(reshape_context->subdiv);
|
||||
}
|
||||
|
||||
free_original_grids(reshape_context);
|
||||
multires_reshape_free_original_grids(reshape_context);
|
||||
|
||||
MEM_freeN(reshape_context->face_start_grid_index);
|
||||
MEM_freeN(reshape_context->ptex_start_grid_index);
|
||||
|
|
Loading…
Reference in New Issue