diff options
-rw-r--r-- | source/blender/blenkernel/intern/mesh.c | 1 | ||||
-rw-r--r-- | source/blender/editors/mesh/editmesh_mask_extract.c | 6 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_mask.c | 2 | ||||
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 3 |
4 files changed, 11 insertions, 1 deletions
diff --git a/source/blender/blenkernel/intern/mesh.c b/source/blender/blenkernel/intern/mesh.c index 0b854c66456..9ccdf5189d1 100644 --- a/source/blender/blenkernel/intern/mesh.c +++ b/source/blender/blenkernel/intern/mesh.c @@ -881,6 +881,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; diff --git a/source/blender/editors/mesh/editmesh_mask_extract.c b/source/blender/editors/mesh/editmesh_mask_extract.c index 96abd2226db..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); } @@ -556,8 +558,12 @@ 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); + 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); diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index 96d34dd6145..26abd19d5e8 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -1293,7 +1293,7 @@ static void sculpt_gesture_apply_trim(SculptGestureContext *sgcontext) BLI_assert(false); break; } - BM_mesh_boolean(bm, looptris, tottri, bm_face_isect_pair, NULL, 2, false, boolean_mode); + BM_mesh_boolean(bm, looptris, tottri, bm_face_isect_pair, NULL, 2, true, boolean_mode); } Mesh *result = BKE_mesh_from_bmesh_for_eval_nomain(bm, NULL, sculpt_mesh); diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index d4bd15badac..ecd45bfb5e9 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -6258,7 +6258,9 @@ static void do_tiled( /* Position of the "prototype" stroke for tiling. */ float orgLoc[3]; + float original_initial_location[3]; copy_v3_v3(orgLoc, cache->location); + copy_v3_v3(original_initial_location, cache->initial_location); for (int dim = 0; dim < 3; dim++) { if ((sd->paint.symmetry_flags & (PAINT_TILE_X << dim)) && step[dim] > 0) { @@ -6289,6 +6291,7 @@ static void do_tiled( for (int dim = 0; dim < 3; dim++) { cache->location[dim] = cur[dim] * step[dim] + orgLoc[dim]; cache->plane_offset[dim] = cur[dim] * step[dim]; + cache->initial_location[dim] = cur[dim] * step[dim] + original_initial_location[dim]; } action(sd, ob, brush, ups); } |