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:
authorJoshua Leung <aligorith@gmail.com>2008-09-26 12:51:05 +0400
committerJoshua Leung <aligorith@gmail.com>2008-09-26 12:51:05 +0400
commit1206061ed431a37c31271364c0ed346809c3abc3 (patch)
tree2dfac9ee09f607d886d9455d660df7eb19af1bdd /source/blender/src/space.c
parent06a5e9b58a0c1281609ee1ddb850fc058fe56c4f (diff)
Patch #17346: Align bones in edit mode
Submitted by: Lorenzo Pierfederici (lento) This patch adds the CTRL-ALT-A hotkey to align bones in armature edit mode. It works the same way as parenting: selected bones will be aligned with active bone, if only one bone is selected it will be aligned with its parent (if any) Thanks!
Diffstat (limited to 'source/blender/src/space.c')
-rw-r--r--source/blender/src/space.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/src/space.c b/source/blender/src/space.c
index d4460e55a3e..92b5580775e 100644
--- a/source/blender/src/space.c
+++ b/source/blender/src/space.c
@@ -1864,8 +1864,11 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
break;
case AKEY:
- if (G.obedit == 0 && G.qual == (LR_CTRLKEY|LR_ALTKEY)) {
- alignmenu();
+ if(G.qual == (LR_CTRLKEY|LR_ALTKEY)) {
+ if(G.obedit == 0)
+ alignmenu();
+ else if(G.obedit->type==OB_ARMATURE)
+ align_selected_bones();
}
else if(G.qual & LR_CTRLKEY) { /* also with shift! */
apply_object();