Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Dobarro <pablodp606@gmail.com>2020-10-01 02:28:00 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-10-05 20:38:08 +0300
commitffd46014470567fa75a5b6492677137f07936428 (patch)
treeb2a37b9a6ff5b0ae15eb26c480d76cf6a1d2dc12
parente1e061384be5d36ff2aa974b17fe1d819db0e6a8 (diff)
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
-rw-r--r--source/blender/editors/mesh/editmesh_mask_extract.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c
index ac3feed4c2a..30949605fec 100644
--- a/source/blender/editors/mesh/editmesh_mask_extract.c
+++ b/source/blender/editors/mesh/editmesh_mask_extract.c
@@ -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);
}