Page MenuHome

Fix T60126: Gradient affects hidden vertices when weight painting
ClosedPublic

Authored by Jacques Lucke (JacquesLucke) on Jan 22 2019, 2:28 PM.

Diff Detail

Repository
rB Blender
Branch
hidden-gradient (branched from master)
Build Status
Buildable 2759
Build 2759: arc lint + arc unit

Event Timeline

Jacques Lucke (JacquesLucke) marked an inline comment as done.Jan 22 2019, 2:30 PM
Jacques Lucke (JacquesLucke) added inline comments.
source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
645–648

Actually, maybe copy_v2_fl(vs->sco, FLT_MAX); is necessary here as well.
It wasn't there before, so I did not insert it.

Brecht Van Lommel (brecht) requested changes to this revision.Jan 22 2019, 2:52 PM
Brecht Van Lommel (brecht) added inline comments.
source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c
645–648

The same test exists in gradientVertUpdate__mapFunc, so it's not strictly necessary.

Code style: use {}, put return on new line.

Also, keep the code in both functions consistent.

This revision now requires changes to proceed.Jan 22 2019, 2:52 PM
  • style fix

I simplified the code a little by just checking for FLT_MAX in gradientVertUpdate__mapFunc.
I could not see a reason why the check, if it is hidden of selected, had to be done again.
I'm not absolutely sure that I did not break anything with that; it worked in my tests.

This revision is now accepted and ready to land.Jan 22 2019, 3:27 PM
This revision was automatically updated to reflect the committed changes.