diff options
author | Joshua Leung <aligorith@gmail.com> | 2007-09-09 15:05:21 +0400 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2007-09-09 15:05:21 +0400 |
commit | 8ddbd84240e6d0cd8ca152ff95c473c6b2e9a910 (patch) | |
tree | d3416412e3fab932ca6b985900574ce5ab3df709 /source/blender/src/header_view3d.c | |
parent | b709e2982fca75a7ec21ff595c87b3c5397a2dd9 (diff) |
Patch #6794: Subdivide Multi for Armatures
This patch, by Juho Vepsalainen (BeBraw), introduces subdivide multi functionality for armatures. It lets you specify the number of divisions that selected bones should be divided into.
I've slightly optimised the code a bit, though the change shouldn't make much of a difference. I've also fixed a minor bug in the menu highlighting, due to duplicate menu event-codes.
Diffstat (limited to 'source/blender/src/header_view3d.c')
-rw-r--r-- | source/blender/src/header_view3d.c | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/source/blender/src/header_view3d.c b/source/blender/src/header_view3d.c index 196655cc97a..79c86012276 100644 --- a/source/blender/src/header_view3d.c +++ b/source/blender/src/header_view3d.c @@ -3672,6 +3672,8 @@ static uiBlock *view3d_edit_armature_rollmenu(void *arg_unused) static void do_view3d_edit_armaturemenu(void *arg, int event) { + static short numcuts= 2; + switch(event) { case 0: /* Undo Editing */ @@ -3700,11 +3702,16 @@ static void do_view3d_edit_armaturemenu(void *arg, int event) extrude_armature(1); break; case 12: /* subdivide */ - subdivide_armature(); + subdivide_armature(1); break; case 13: /* flip left and right names */ armature_flip_names(); break; + break; + case 15: /* subdivide multi */ + if(button(&numcuts, 1, 128, "Number of Cuts:")==0) return; + waitcursor(1); + subdivide_armature(numcuts); } allqueue(REDRAWVIEW3D, 0); } @@ -3774,7 +3781,8 @@ static uiBlock *view3d_edit_armaturemenu(void *arg_unused) uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Subdivide|W, 1", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 12, ""); - uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Flip Left & Right Names|W, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Subdivide Multi|W, 2", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 15, ""); + uiDefIconTextBut(block, BUTM, 1, ICON_BLANK1, "Flip Left & Right Names|W, 3", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 1, 13, ""); uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, ""); |