Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2006-02-23 17:45:59 +0300
committerCampbell Barton <ideasman42@gmail.com>2006-02-23 17:45:59 +0300
commit6e12747b71071143002c24e44f5579eb75c7408a (patch)
tree13bfca8e387643f4f27930501af8384bc9d7cbf9
parent2c1a328f580f9ef1ec0314321bd802c169cbe042 (diff)
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.
-rw-r--r--source/blender/makesdna/DNA_armature_types.h2
-rw-r--r--source/blender/src/drawview.c11
2 files changed, 10 insertions, 3 deletions
diff --git a/source/blender/makesdna/DNA_armature_types.h b/source/blender/makesdna/DNA_armature_types.h
index 809ff15e46d..f2080c60cef 100644
--- a/source/blender/makesdna/DNA_armature_types.h
+++ b/source/blender/makesdna/DNA_armature_types.h
@@ -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;
diff --git a/source/blender/src/drawview.c b/source/blender/src/drawview.c
index 467e4e84674..b2b3c8d4ab7 100644
--- a/source/blender/src/drawview.c
+++ b/source/blender/src/drawview.c
@@ -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)