There are a number of issues with the "Active Vertex" mode for the Set
Pivot operator in Sculpt Mode:
1. The menu option did not require the cursor, so moving off of the mesh
and using this option would previously pick the last value in the
`SculptSession`
2. The active vertex information was not updated when this was called,
so even if the user invoked this operator with their mouse on the
mesh via the Operator Search popup, it would not use the right
position. This also means behavior would differ depending on if a
brush tool was being used or the transform tools.
To fix these issues, the relevant flags are set for the operator as a
whole, and the internal active vert information is updated prior to
being requested for this operator.
Note that this does add an extra mouse click required for calling the
operator via the Operator Search menu, but given that it only worked in
specific situations before, this is an acceptable tradeoff. Assigning a
shortcut to this operator removes this requirement, as expected.
Pull Request: https://projects.blender.org/blender/blender/pulls/143675