How do I set the origin of a mesh to the center of its axes-aligned bounding box? Do not flag this as a duplicate. The answers that are out there on similar questions contain shortcuts which do nothing in my version of blender (2.80.0-git.3dc9da3a74ee-windows64). Furthermore, they do not consider axes-aligned bounding boxes.

That out of the way, here is my problem:


I need to generate an axes-aligned bounding box of an object
I need to set the cursor to the middle of that box
I need to set the origin of the object to my cursor


The object consists of a single mesh.

Sounds easy enough, but I have no idea how to complete step 1. How do I go about this?
No scripting required.

1) Select your whole mesh in edit mode (it may also work in object mode)

2) Change your pivot point to "Bounding box center" (little dropdown menu at the top of your 3D view)

3) Use Shift+S and select "Cursor to selected"

4) Enjoy !!!