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:
authorPhilipp Oeser <info@graphics-engineer.com>2020-12-18 16:40:37 +0300
committerPhilipp Oeser <info@graphics-engineer.com>2020-12-29 20:38:16 +0300
commit48e0e0e2ac73b003056f9a1c7f392b73b8d3c10b (patch)
tree01e8dd3bbdd7af75b64be0cef7700c9d670ad8a9 /source/blender/editors/sculpt_paint/sculpt.c
parentae8241032959c7bc225dfaef3b75f44b1f65577b (diff)
Fix T83439: Sculpt: Radial symmetry combined with mirroring results in texture offsets
Looks like this has been wrong since the introduction in rB5505697ac508 10 years ago. To get the proper texture lookup in the mirrored area, first rotate, then translate/flip [instead of the other way around]. Maniphest Tasks: T83439 Differential Revision: https://developer.blender.org/D9897
Diffstat (limited to 'source/blender/editors/sculpt_paint/sculpt.c')
-rw-r--r--source/blender/editors/sculpt_paint/sculpt.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/blender/editors/sculpt_paint/sculpt.c b/source/blender/editors/sculpt_paint/sculpt.c
index 8b586e60032..823213007b0 100644
--- a/source/blender/editors/sculpt_paint/sculpt.c
+++ b/source/blender/editors/sculpt_paint/sculpt.c
@@ -2466,12 +2466,10 @@ float SCULPT_brush_strength_factor(SculptSession *ss,
* across the symmetry axis and rotate it back to the original
* position in order to project it. This insures that the
* brush texture will be oriented correctly. */
-
- flip_v3_v3(symm_point, point, cache->mirror_symmetry_pass);
-
if (cache->radial_symmetry_pass) {
- mul_m4_v3(cache->symm_rot_mat_inv, symm_point);
+ mul_m4_v3(cache->symm_rot_mat_inv, point);
}
+ flip_v3_v3(symm_point, point, cache->mirror_symmetry_pass);
ED_view3d_project_float_v2_m4(cache->vc->region, symm_point, point_2d, cache->projection_mat);