Restoring weights is problematic when the stroke overlaps its mirror.
It's better to simply compute the new weight based on the saved data
rather than restoring things, and check that the change is monotonic.
This way is also closer to how things worked before the merge.
This secondary accumulation option accumulated brush falloff.
The same option in image painting accumulates color
as vertex paiht 'Spray' does.
Giving this option different behavior for vertex paint seems strange.
Also this is basically increasing falloff over time.
Remove the new code, expose existing 'Spray' as 'Accumulate'
to match other paint modes.
The issue here is that we can not read scale from socket when determining
dependent area of interest. This area will depend on current pixel. Now fall
back to more stupid but reliable thing: if scale size input is connected to some
nodes, we use the whole frame as area of interest.
This makes vertex paint match image painting more closely.
- Add falloff shape option sphere/circle
where sphere uses a 3D radius around the cursor and
circle uses a 2D radius (projected), like previous releases.
- Add normal angle option so you can control the falloff.
- Add Cull option, to paint onto faces pointing away.
Disabling normals, culling and using circle falloff
allows you to paint through the mesh.
When painting with spray disabled - we need to re-apply
on top of the original each time.
Applying the soc-2016-pbvh-painting branch removed this.
While I'd added back a simple previous weight array,
this won't work when multiple groups are painted at once.
This is most pronounced in Auto-Normalize + Multi-Paint. Unlike
vertex paint, the weights being painted on in weight paint mode
don't necessarily correspond to the weight actually stored in
any one vertex group, and may instead be a computed aggregate.
This restores original code behavior lost in rB4f616c93f7cb.
Note that this tool seems like it might need to be rewritten
since results are quite strange.
Projecting on the view vector gives a small improvement though.
paint_vertex.c was getting too big, move all code unrelated to
mode switching and modal painting into their own files.
Also replace vertex-color operators region redraw tag /w notifiers.