From e836c806e494347ead406b7b52a5e4c57f095bb3 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 2 Nov 2020 22:54:19 +0100 Subject: Fix T81842: Cloth brush not creating simulation areas for each tiling symmetry pass The cloth brush fixed simulation areas are created using the initial_location variable in the StrokeCache. This variable was not being updated by tiling symmetry, so all symmetry passes were using the same simulation area location. Reviewed By: sergey Maniphest Tasks: T81842 Differential Revision: https://developer.blender.org/D9421 --- source/blender/editors/sculpt_paint/sculpt.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c index ae0d43bcf5c..56b5a494df0 100644 --- a/source/blender/editors/sculpt_paint/sculpt.c +++ b/source/blender/editors/sculpt_paint/sculpt.c @@ -6242,7 +6242,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) { @@ -6273,6 +6275,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); } -- cgit v1.2.3 From c9fb25342bc01ed67809ed55cc6188b456ce0704 Mon Sep 17 00:00:00 2001 From: Pablo Dobarro Date: Mon, 2 Nov 2020 23:08:01 +0100 Subject: Fix T81799: Enable use self in trimming tool booleans This enables self intersections in the sculpt trimming tools boolean operations. This should fix wrong booleans results after using the operator to add new disconnected geometry with the join mode. Reviewed By: sergey Maniphest Tasks: T81799 Differential Revision: https://developer.blender.org/D9423 --- source/blender/editors/sculpt_paint/paint_mask.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source/blender/editors/sculpt_paint') diff --git a/source/blender/editors/sculpt_paint/paint_mask.c b/source/blender/editors/sculpt_paint/paint_mask.c index 2193a31f19b..cc0d20089b4 100644 --- a/source/blender/editors/sculpt_paint/paint_mask.c +++ b/source/blender/editors/sculpt_paint/paint_mask.c @@ -1161,7 +1161,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); -- cgit v1.2.3