Page MenuHome

lattice boundingboxes (and armature boundingbox cleanup)
AbandonedPublic

Authored by Bastien Montagne (mont29) on Aug 12 2015, 6:30 PM.

Details

Summary

this will:

  • draw lattice boundingboxes in 3dView [if "show_bounds" is used -- an option previously pretty useless for lattices]
  • give proper values for lattice objects ".bound_box" in bpy
  • give proper values for armature objects ".bound_box" in bpy
  • lets users use "Dimensions" [in 3dView Transform panel] on lattices and armatures
  • remove redundant calculations in "boundbox_armature()"
  • (armatures boundingboxes were already drawn in 3dView [if "show_bounds" is used])

based on report T45735: Lattice's bounding_box doesn't update and a comment in code by @Campbell Barton (campbellbarton) "* later we may want to add dimensions for lattice, armature etc too */

Diff Detail

Event Timeline

Philipp Oeser (lichtwerk) retitled this revision from to lattice boundingboxes (and armature boundingbox cleanup).
Philipp Oeser (lichtwerk) updated this object.
Bastien Montagne (mont29) edited edge metadata.

Aside from picky details noted below, LGTM. :)

source/blender/blenkernel/intern/armature.c
2191

You can change that one to malloc too…

source/blender/blenkernel/intern/lattice.c
1149

No need to calloc here, malloc is enough ;)

This revision is now accepted and ready to land.Aug 12 2015, 8:19 PM
Philipp Oeser (lichtwerk) edited edge metadata.

review by @Bastien Montagne (mont29):

  • replace MEM_callocN with MEM_mallocN for both lattice/armature bb allocation
Philipp Oeser (lichtwerk) marked 2 inline comments as done.Aug 13 2015, 3:56 PM

@Philipp Oeser (lichtwerk) if you have commit rights, feel free to go on and commit (otherwise, please tell, and I’ll commit it on your behalf).

@Bastien Montagne (mont29): please go ahead (I dont have commit rights), and thanx for review :)

This revision now requires review to proceed.Aug 13 2015, 7:14 PM

sigh at tracker auto-magic…

Committed as rB3fa0a1a5bc0ff2, thanks. :)