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 22:09:41 +0300
committerPablo Dobarro <pablodp606@gmail.com>2020-11-04 01:59:24 +0300
commita5aa56cd71937bb0bb8a722415a2865c341ee488 (patch)
treeac008be9686aa582a3afea026981f7c6b8998fac /source/blender/editors/mesh
parent0dd599f91643f3015f3dce5421f53bf9726cbe8d (diff)
Fix mask extract and slice not preserving mesh symmetry options
When extracting new objects from a mesh in sculpt mode, it makes sense to keep the current symmetry options and settings in the new mesh. In previous versions symmetry options were stored in the tool settings, so this bug was not that obvious. This also preserves the remember settings in the new object, which is also the desired behaviour. Reviewed By: sergey, mont29 Differential Revision: https://developer.blender.org/D9417
Diffstat (limited to 'source/blender/editors/mesh')
-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 c97f7ef9929..8ef1f9ee176 100644
--- a/source/blender/editors/mesh/editmesh_mask_extract.c
+++ b/source/blender/editors/mesh/editmesh_mask_extract.c
@@ -225,6 +225,8 @@ static int geometry_extract_apply(bContext *C,
/* 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);
+ BKE_mesh_copy_settings(new_ob_mesh, mesh);
+
if (params->apply_shrinkwrap) {
BKE_shrinkwrap_mesh_nearest_surface_deform(C, new_ob, ob);
}
@@ -561,6 +563,7 @@ static int paint_mask_slice_exec(bContext *C, wmOperator *op)
BKE_mesh_nomain_to_mesh(new_ob_mesh, new_ob->data, new_ob, &CD_MASK_MESH, true);
BKE_mesh_calc_normals(new_ob->data);
+ BKE_mesh_copy_settings(new_ob->data, mesh);
WM_event_add_notifier(C, NC_OBJECT | ND_MODIFIER, new_ob);
BKE_mesh_batch_cache_dirty_tag(new_ob->data, BKE_MESH_BATCH_DIRTY_ALL);
DEG_relations_tag_update(bmain);