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:

  1. I need to generate an axes-aligned bounding box of an object
  2. I need to set the cursor to the middle of that box
  3. 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?

  • 1
    $\begingroup$ Ignoring shortcuts that may have changed isn't this: Set origin to center of geometry? Related blender.stackexchange.com/a/139850/15543 $\endgroup$ – batFINGER May 12 '19 at 13:25
  • $\begingroup$ Reading from the title and description, not really. As I picture it, he wants to slide the origin around (set it to bb center) on a single axis. I also tried right clicking my object in object mode and setting the origin to geometry, but I could see right away that it didn't actually set it to the middle of the bounding box. $\endgroup$ – AnnoyinC May 12 '19 at 13:28
  • 1
    $\begingroup$ The link is to my answer. It shows how set origin to bounding box using code, on either one axis (as per question) or all axes. Is or is not set origin to center of geometry the result you are after?, I think it is. In which case I also think this is a duplicate. $\endgroup$ – batFINGER May 12 '19 at 13:33
  • $\begingroup$ Oh, you're right. The script is giving an error for me though on "context" so I'll have to figure out the blender api. $\endgroup$ – AnnoyinC May 12 '19 at 13:37
  • $\begingroup$ Run in object mode, with mesh object active. As re your deleted answer, it is simply set origin to geometry (bounds). There's no need to get too complicated and learn the python API over this. $\endgroup$ – batFINGER May 12 '19 at 13:44

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 !!!


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.