Added UI numeric access to bone radius (for envelopes), needed to accsess the other day to make bones the same radius and had to guess.

See the edit bone properties.

Just added a comment to DNA_armature_types.h about rad_head and rad_tail override, if a parant exists.
This commit is contained in:
Campbell Barton 2006-02-23 14:45:59 +00:00
parent 2c1a328f58
commit 6e12747b71
2 changed files with 10 additions and 3 deletions

@ -63,7 +63,7 @@ typedef struct Bone {
float dist, weight; /* dist, weight: for non-deformgroup deforms */
float xwidth, length, zwidth; /* width: for block bones. keep in this order, transform! */
float ease1, ease2; /* length of bezier handles */
float rad_head, rad_tail; /* radius for head/tail sphere, defining deform as well */
float rad_head, rad_tail; /* radius for head/tail sphere, defining deform as well, parent->rad_tip overrides rad_head*/
float size[3]; /* patch for upward compat, UNUSED! */
short layer;

@ -1701,7 +1701,7 @@ static void v3d_editarmature_buts(uiBlock *block, Object *ob, float lim)
if (!ebone)
return;
but= uiDefBut(block, TEX, B_DIFF, "Bone:", 160, 140, 140, 19, ebone->name, 1, 31, 0, 0, "");
but= uiDefBut(block, TEX, B_DIFF, "Bone:", 160, 150, 140, 19, ebone->name, 1, 31, 0, 0, "");
uiButSetFunc(but, validate_editbonebutton_cb, ebone, NULL);
uiBlockBeginAlign(block);
@ -1715,7 +1715,14 @@ static void v3d_editarmature_buts(uiBlock *block, Object *ob, float lim)
uiBlockEndAlign(block);
ob_eul[0]= 180.0*ebone->roll/M_PI;
uiDefButF(block, NUM, B_ARMATUREPANEL1, "Roll:", 10, 100, 140, 19, ob_eul, -lim, lim, 1000, 3, "");
uiBlockBeginAlign(block);
uiDefButF(block, NUM, B_ARMATUREPANEL1, "TipRadius:", 10, 150, 140, 19, &ebone->rad_tail, 0, lim, 10, 3, "");
if (ebone->parent)
uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadRadius:", 10, 130, 140, 19, &ebone->parent->rad_tail, 0, lim, 10, 3, "");
else
uiDefButF(block, NUM, B_ARMATUREPANEL1, "HeadRadius:", 10, 130, 140, 19, &ebone->rad_head, 0, lim, 10, 3, "");
uiBlockEndAlign(block);
}
static void v3d_editmetaball_buts(uiBlock *block, Object *ob, float lim)