Page MenuHome

Fix sculpting/painting with viewport clipping and radial symmetry
ClosedPublic

Authored by Philipp Oeser (lichtwerk) on Oct 6 2020, 12:54 PM.

Details

Summary

This was reported for sculpting, the same is true for weightpaint or
vertexpaint though.

When viewport clipping and radial symmetry are enabled, the
'sculpt_brush_test_clipping()' function was not considering radial
symmetry at all, so if the coordinate was outside the clipping planes,
no action would take place. Now the coordinte is brought back to where
the stroke actually happens and that is checked against clipping.

Since other mirroring options while painting/sculpting (as well as
editmode operations with mirroring) usually still take place even if the
mirrored coord is outside the clipping planes, this should also be the
case for radial symmetry.

This grows the 'SculptBrushTest' struct a bit, but should be acceptable?

Fixes T81466

Diff Detail

Repository
rB Blender

Event Timeline

Philipp Oeser (lichtwerk) requested review of this revision.Oct 6 2020, 12:54 PM
Philipp Oeser (lichtwerk) created this revision.

I'll fix the extra line after you commit this.
I also don't see a reason for not growing the struct, but better ask @Sergey Sharybin (sergey) just to be sure.

This revision is now accepted and ready to land.Oct 6 2020, 10:37 PM

I also don't see a reason for not growing the struct, but better ask @Sergey Sharybin (sergey) just to be sure.

@Sergey Sharybin (sergey): since you are back: are you fine with this, too?

Sergey Sharybin (sergey) requested changes to this revision.Oct 13 2020, 12:33 PM
Sergey Sharybin (sergey) added inline comments.
source/blender/editors/sculpt_paint/sculpt.c
1611–1612

Please figure out why this is needed rather than adding comments in the code raising existentialist questions of the code.

This revision now requires changes to proceed.Oct 13 2020, 12:33 PM

remove comment about needless assignment (not part of this fix and can be done in a separate commit)

Philipp Oeser (lichtwerk) marked an inline comment as done.Oct 13 2020, 12:53 PM
source/blender/editors/sculpt_paint/sculpt.c
1611–1612

I'll fix the extra line after you commit this.

Removed the comment, but looks like this assignement is just redundant. (can be removed in a separate commit)

This patch seems fine. Isolated and does one thing only.

The line which originally triggered the feedback can indeed be removed, but it is not related to this bugfix.

This revision is now accepted and ready to land.Oct 13 2020, 12:56 PM

I'll fix the extra line after you commit this.

@Pablo Dobarro (pablodp606) : I have removed this now in rB79875e37fe28