2
$\begingroup$

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

$\endgroup$
4
  • $\begingroup$ 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 :) $\endgroup$
    – gandalf3
    Commented Feb 23, 2016 at 0:30
  • $\begingroup$ I wrote an addon for this answer that creates a bounding box around selected objects. $\endgroup$
    – sambler
    Commented Feb 23, 2016 at 15:23
  • $\begingroup$ Thanks @sambler! Can you add this as an answer so I can mark is as the correct one? $\endgroup$ Commented Feb 23, 2016 at 20:31
  • $\begingroup$ Oops, it throws an error: File "\Text", line 141, in execute File "\Text", line 141, in <listcomp> IndexError: BMElemSeq[index]: outdated internal index table, run ensure_lookup_table() first $\endgroup$ Commented Feb 23, 2016 at 20:35

3 Answers 3

3
$\begingroup$

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.

$\endgroup$
4
  • $\begingroup$ Thanks! Could you update the answer so that it works with the current version of blender? $\endgroup$ Commented Feb 24, 2016 at 11:58
  • $\begingroup$ What doesn't work? I updated the addon before answering using a recent build. $\endgroup$
    – sambler
    Commented Feb 24, 2016 at 12:02
  • $\begingroup$ Oh yeah, sorry, everything works. Thanks again! $\endgroup$ Commented Feb 24, 2016 at 17:15
  • $\begingroup$ Hello. Can you tweak addon also to use collection instances as group of meshes to add BB. Thanks. $\endgroup$
    – APEC
    Commented Aug 8, 2021 at 6:26
0
$\begingroup$

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.
$\endgroup$
1
  • 1
    $\begingroup$ Yup, but this works only if the group consists of mesh objects. $\endgroup$ Commented Feb 23, 2016 at 10:27
0
$\begingroup$

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.

$\endgroup$
1
  • 2
    $\begingroup$ Good answer, thanks, but it does have the manual step... $\endgroup$ Commented Feb 23, 2016 at 10:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .