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
This commit is contained in:
parent
0dd599f916
commit
a5aa56cd71
|
@ -923,6 +923,7 @@ void BKE_mesh_copy_settings(Mesh *me_dst, const Mesh *me_src)
|
|||
me_dst->remesh_voxel_size = me_src->remesh_voxel_size;
|
||||
me_dst->remesh_voxel_adaptivity = me_src->remesh_voxel_adaptivity;
|
||||
me_dst->remesh_mode = me_src->remesh_mode;
|
||||
me_dst->symmetry = me_src->symmetry;
|
||||
|
||||
me_dst->face_sets_color_seed = me_src->face_sets_color_seed;
|
||||
me_dst->face_sets_color_default = me_src->face_sets_color_default;
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue