Fix T68499: weight paint gradient is broken with generative modifiers
authorPhilipp Oeser <info@graphics-engineer.com>
Wed, 20 Nov 2019 20:08:42 +0000 (21:08 +0100)
committerPhilipp Oeser <info@graphics-engineer.com>
Thu, 21 Nov 2019 12:20:04 +0000 (13:20 +0100)
commitcee94789850e99fc68dd398e7d1abd67f0e2b85d
tree5029218744baed0365dc0ecde29938a487ee73b2
parent1fbb86654a82df7bbce0566b8b335f8631116d65
Fix T68499: weight paint gradient is broken with generative modifiers

Caused by rBac442da4a14d.

Above commit tweaked the logic to not only early out, but also set the
WPGradient_vertStore screen coord to FLT_MAX in case this original index
was visited before [gradientVertInit__mapFunc].
For generative modifiers though, we might get here multiple times for the
same orig index, resulting in a valid orig index being made invalid for
gradientVertUpdate__mapFunc [which would early out in case of FLT_MAX].

Restored original logic, so that setting FLT_MAX only really happens
when it should: when ED_view3d_project_float_object fails...

Maniphest Tasks: T68499

Differential Revision: https://developer.blender.org/D6282
source/blender/editors/sculpt_paint/paint_vertex_weight_ops.c