Sculpt: Remove mask datalayer after extracting the object

When extracting a mask, the new object is going to have the same mask on
the same vertices, so it can't be sculpted without clearing the mask
first. It makes more sense to delete the mask datalayer from the new
object.

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D9070
This commit is contained in:
Pablo Dobarro 2020-10-01 01:28:00 +02:00
parent e1e061384b
commit ffd4601447
1 changed files with 3 additions and 0 deletions

View File

@ -222,6 +222,9 @@ static int geometry_extract_apply(bContext *C,
Mesh *new_ob_mesh = new_ob->data;
CustomData_free_layers(&new_ob_mesh->pdata, CD_SCULPT_FACE_SETS, new_ob_mesh->totpoly);
/* Remove the mask from the new object so it can be sculpted directly after extracting. */
CustomData_free_layers(&new_ob_mesh->vdata, CD_PAINT_MASK, new_ob_mesh->totvert);
if (params->apply_shrinkwrap) {
BKE_shrinkwrap_mesh_nearest_surface_deform(C, new_ob, ob);
}