In some cases it is necessary to be able to hide parts of the mesh
in order to paint certain poorly accessible areas. One worst case
example is the MakeHuman base mesh, which includes multiple
layers of clothing template layers in one mesh object with the body.
The Mask modifier, which is used to hide mesh parts for render,
doesn't work in weight paint, so a paint specific hiding method
is required.
Such method exists: mesh parts hidden in Edit mode are also
hidden in Weight Paint, but only if vertex or face selection is
enabled. However, it is not clear why hiding should be tied to
selection, and enabling selection has downsides like not being
able to select bones.
This patch makes the weight and vertex paint modes respect
edit mode hiding even without enabling selection, like in sculpt
mode. The change in behavior affects drawing and building paint
PBVH. Thus it affects brushes, but not menu operators like Smooth
or Normalize.
