diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2020-11-03 00:54:19 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2020-11-04 02:01:33 +0300 |
commit | e836c806e494347ead406b7b52a5e4c57f095bb3 (patch) | |
tree | bd7b3890fb1ae5ac1b08d7991b89d251c1fd4f9e /source/blender/editors/sculpt_paint/sculpt.c | |
parent | a5aa56cd71937bb0bb8a722415a2865c341ee488 (diff) |
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
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r-- | source/blender/editors/sculpt_paint/sculpt.c | 3 |
1 files changed, 3 insertions, 0 deletions
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); } |