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-11-02 21:56:56 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-11-04 01:57:12 +0300
commit0dd599f91643f3015f3dce5421f53bf9726cbe8d (patch)
tree49d5f3230f8104fc410517d0cee392ca8c9ecae8 /source/blender/editors/mesh/editmesh_mask_extract.c
parent9e8a488af2093c2724af9372aebb96f5e6736a65 (diff)
Fix mask slice to new object preserving the mask
If the new object contains the mask it always needs to be cleared before starting sculpting on it. This fix was also committed before in the mask extract operator. Reviewed By: sergey Differential Revision: https://developer.blender.org/D9416
Diffstat (limited to 'source/blender/editors/mesh/editmesh_mask_extract.c')
-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 96abd2226db..c97f7ef9929 100644
--- a/source/blender/editors/mesh/editmesh_mask_extract.c
+++ b/source/blender/editors/mesh/editmesh_mask_extract.c
@@ -556,6 +556,9 @@ static int paint_mask_slice_exec(bContext *C, wmOperator *op)
mesh);
BM_mesh_free(bm);
+ /* Remove the mask from the new object so it can be sculpted directly after slicing. */
+ CustomData_free_layers(&new_ob_mesh->vdata, CD_PAINT_MASK, new_ob_mesh->totvert);
+
BKE_mesh_nomain_to_mesh(new_ob_mesh, new_ob->data, new_ob, &CD_MASK_MESH, true);
BKE_mesh_calc_normals(new_ob->data);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, new_ob);