2

Enabling bounds display on a group instance draws bounding boxes for each individual object:

enter image description here

How to have a boundary box around the entire group instance? Via python or not. It seems to possible, this guy did it: https://vimeo.com/139789313

brasshat
  • 5,446
  • 7
  • 23
  • 44
PLyczkowski
  • 896
  • 1
  • 10
  • 18
  • I hope you don't mind, your question was being flagged as low-quality so I took the liberty of adding a screenshot showing what I hope is the problem :) – gandalf3 Feb 23 '16 at 00:30
  • I wrote an addon for this answer that creates a bounding box around selected objects. – sambler Feb 23 '16 at 15:23
  • Thanks @sambler! Can you add this as an answer so I can mark is as the correct one? – PLyczkowski Feb 23 '16 at 20:31
  • Oops, it throws an error: File "\Text", line 141, in execute File "\Text", line 141, in IndexError: BMElemSeq[index]: outdated internal index table, run ensure_lookup_table() first – PLyczkowski Feb 23 '16 at 20:35

3 Answers3

3

I wrote a small addon for another question that creates a bounding box around all selected objects. It seems it needed a little update to work in current versions of blender which is now available.

This does not create a dynamic bounding box, it will only match the objects you have selected at the time you create it, this can just be deleted and re-created whenever you needs updating.

After selecting one object you can use ⇧ ShiftG->Group to select all objects of the same group before creating the bounding box.

sambler
  • 55,387
  • 3
  • 59
  • 192
0

From a python perspective, Ill give you a pseudo run down of how I might approach this:

  1. copy the group.
  2. join each object in the new group together as one object.
  3. get the bounding box of the new joined geometry object.
  4. delete the new object.
Rick Riggs
  • 4,623
  • 14
  • 30
0

Well not sure about python as my coding skills are next to zero, but you could do this manually for each different group in the following way:

  1. Add a new default cube mesh to your scene
  2. Enter edit mode
  3. Select all with A
  4. Press X to delete and chose Only Faces option. (That should leave you with a wireframe-like edges only skeleton of the cube.)
  5. In the Properties Window > Object Tab> Duplication > Choose whichever group you want to duplicate
  6. Now (still in edit mode) manually adjust the size of the cube edges to bound the duplicated group

Now you have a manually created bounding box., you can even customize the shape of your wire-frame mesh to suit your liking and have a custom bounding box shape, since it has no visible geometry it should not affect your rendered images You can even use it as a custom dummy object for snapping or helping place the group where desired.

Duarte Farrajota Ramos
  • 59,425
  • 39
  • 130
  • 187