# 2D- Bounding box around human model with sub meshes and armature

Mast is the entire model, It has sub meshes as can been seen from the figure, like eyes, clothes, but belonging to the same human model. I need to get the mesh of all of that together, so as to draw a 2d bounding box around the object on rendered image (like in this link 2d-bounding box on images)

My object is a human model with armature , imported. I am trying to get 2D bounding box using the code here . In this only object meshes can be passed? How can I pass the complete model to this?

when I pass armature object, this gives error : Object does not have geometry data in the line

me = me_ob.to_mesh(scene, True, 'PREVIEW')


• You want the bounding box of the armature or mesh?
– Tak
Mar 15, 2017 at 23:38
• It seems the armature "Mast" is what you try to convert to a mesh. Armatures have no geometry and can not be converted directly with "to_mesh". If this is really the armature you want to convert, you can use a script like this one: blender.stackexchange.com/questions/75040/… Mar 16, 2017 at 5:23
• @lemon Thanks, Actually no, not the armature. Mast is the entire model, It has sub meshes as can been seen from the figure, like eyes, clothes, but belonging to the same human model. i need to get the mesh of all of that together. Mar 16, 2017 at 8:13
• @Tak I need the bounding box for the whole model,(so, i think armature +mesh), so that I get bounding boxes at each frames of animation. Mar 16, 2017 at 8:15

You can use this addon made by @sambler's answer found here, which creates a bounding box for the selected objects. So you can select both armature and mesh in your script and modify the addon to get the bounding box data without creating the bounding box cube.

• thanks for the link. Before I start, can I also get the 2D bounding box of an object in rendered image ? Moreover , I need to do it via python script Mar 16, 2017 at 9:55
• @p.Neu I'm not sure about getting the bounding box in the rendered image. Better ask another question about that.
– Tak
Mar 16, 2017 at 10:09
• there is something already here link, but I can't use it when I have a group of meshes corresponding to one object, Mar 16, 2017 at 10:11