Also includes some minor refactoring: use guard clauses instead of nested conditionals.
Details
Details
Diff Detail
Diff Detail
- Repository
- rB Blender
- Branch
- hidden-gradient (branched from master)
- Build Status
Buildable 2759 Build 2759: arc lint + arc unit
Event Timeline
| 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. | |
| 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. | |
Comment Actions
- 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.