diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-11-02 21:56:56 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-11-04 01:57:12 +0300 |
commit | 0dd599f91643f3015f3dce5421f53bf9726cbe8d (patch) | |
tree | 49d5f3230f8104fc410517d0cee392ca8c9ecae8 /source/blender/editors/mesh | |
parent | 9e8a488af2093c2724af9372aebb96f5e6736a65 (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')
-rw-r--r-- | source/blender/editors/mesh/editmesh_mask_extract.c | 3 |
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); |