diff options
author | Philipp Oeser <info@graphics-engineer.com> | 2020-10-13 10:45:37 +0300 |
---|---|---|
committer | Philipp Oeser <info@graphics-engineer.com> | 2020-10-19 16:01:38 +0300 |
commit | 29dbe00719812925ab88030ce68509bf113520c5 (patch) | |
tree | f3689883a49fad950332ea912870e5e19976f21f | |
parent | 477d983c2e8ab298cbf638d5aadd77fad9c2f677 (diff) |
Fix T81484: Weight/Vertex paint with mirror and viewport clipping does not update stroke on initial side
Issue introduced in rB4f616c93f7cb.
Issue here is that the the `StrokeCache` `mirror_symmetry_pass` is still
in its previous state when entering
`wpaint_do_symmetrical_brush_actions`.
For the initial stroke this means that the (wrong) cache
`mirror_symmetry_pass` ends up in SculptBrushTest `mirror_symmetry_pass`
as well and thus the clipping test in `sculpt_brush_test_clipping` will
fail.
[ This one flips the coords to test against clipping according to (now
wrong) `mirror_symmetry_pass` ]
Solution seems simple: just ensure we start of with a
`mirror_symmetry_pass` of zero in `wpaint_do_symmetrical_brush_actions`
for the initial stroke.
Same thing is done for vertex paint as well.
Maniphest Tasks: T81484
Differential Revision: https://developer.blender.org/D9268
-rw-r--r-- | source/blender/editors/sculpt_paint/paint_vertex.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_vertex.c b/source/blender/editors/sculpt_paint/paint_vertex.c index 6472da48f40..2876670a8d2 100644 --- a/source/blender/editors/sculpt_paint/paint_vertex.c +++ b/source/blender/editors/sculpt_paint/paint_vertex.c @@ -2296,6 +2296,7 @@ static void wpaint_do_symmetrical_brush_actions( int i = 0; /* initial stroke */ + cache->mirror_symmetry_pass = 0; wpaint_do_paint(C, ob, wp, sd, wpd, wpi, me, brush, 0, 'X', 0, 0); wpaint_do_radial_symmetry(C, ob, wp, sd, wpd, wpi, me, brush, 0, 'X'); wpaint_do_radial_symmetry(C, ob, wp, sd, wpd, wpi, me, brush, 0, 'Y'); @@ -3316,6 +3317,7 @@ static void vpaint_do_symmetrical_brush_actions( int i = 0; /* initial stroke */ + cache->mirror_symmetry_pass = 0; vpaint_do_paint(C, sd, vp, vpd, ob, me, brush, i, 'X', 0, 0); vpaint_do_radial_symmetry(C, sd, vp, vpd, ob, me, brush, i, 'X'); vpaint_do_radial_symmetry(C, sd, vp, vpd, ob, me, brush, i, 'Y'); |