This patch adds a select option to the reveal / unhide operators for the following editors:
Armature, Pose, Curve, Mask, Mesh, Object, Paint, Particles, Graph, UVEdit
These changes actively select or unselect the objects being unhidden.
Most of the hide operators actively deselect when hiding objects. However, there are some exceptions:
Hidden metaballs can still be selected / unselected and manipulated in the same way as unhidden ones.
Muting strips in the video sequence editor works the same way.
Hiding tracking markers in the movie clip editor prevents manipulation, but does not change selection.
It might be worth adding the select option to these editors, but with an additional setting ("no change" (?) - do not change the current selection) as the default. If this sounds like a good idea, is this something that should be added here?
Sculpt mode hide / show doesn't have anything to do with selection, so I haven't touched it.
The paint reveal operator had an unused "unselected" variable. This has been replaced with the select option.
The paint reveal operator was also unsetting the hidden flag incorrectly (using -= FOO instead of &= ~FOO). This has been changed in this patch.
Although the select unhidden feature works correctly in vertex paint and weight paint mode, it doesn't work in texture paint mode. It seems that changing the option in the redo panel doesn't properly redo the action (the same can be seen with the hide operator). I'm inclined to report this as a bug (if it's not known already).
When a mask operator is called in Mask mode in the uv/image edit window, the operator is shown in the redo panel in the 3dview window's toolbar. However none of the additional settings are presented (e.g. new mask should have a name property, hide / unhide should have unselected / select options etc.). These options can still be accessed with F6, they just aren't shown in the redo panel. This also seems like a bug. The same issue exists in the graph editor (at least with hiding / unhiding).
Redo also doesn't work properly in particle edit mode (try select random, then H key to hide, then pick the unselected option in the redo panel -> everything gets hidden instead of just the unselected items). Select less / select more don't seem to work at all. I guess this is another bug?
Please let me know if anything needs changing or if you have any other comments.