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:
authorTon Roosendaal <ton@blender.org>2006-11-24 21:58:59 +0300
committerTon Roosendaal <ton@blender.org>2006-11-24 21:58:59 +0300
commit8106c0e72122479ad6b06d175857a8cd9b8b2e9a (patch)
treec45b6dd838fab39afd006bd25fe6c91105943552 /source/blender/src/toolbox.c
parentc3adb61dcc6b550efa1df0eb5c8a4729bd47350a (diff)
Bone Layer feature: now also Armature layers have a hotkey menu; Shift+m.
Note that these menus again react to hotkeys, so making layer 4 visible then is Shift+m, 4.
Diffstat (limited to 'source/blender/src/toolbox.c')
-rw-r--r--source/blender/src/toolbox.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source/blender/src/toolbox.c b/source/blender/src/toolbox.c
index fe75b7e0e0c..aeba6e8a667 100644
--- a/source/blender/src/toolbox.c
+++ b/source/blender/src/toolbox.c
@@ -351,7 +351,7 @@ short fbutton(float *var, float min, float max, float a1, float a2, char *str)
return 0;
}
-int movetolayer_buts(unsigned int *lay)
+int movetolayer_buts(unsigned int *lay, char *title)
{
uiBlock *block;
ListBase listb={0, 0};
@@ -382,8 +382,10 @@ int movetolayer_buts(unsigned int *lay)
dx= (sizex-5)/12;
dy= sizey/2;
- /* buttons have 0 as return event, to prevent menu to close on hotkeys */
+ if(title)
+ uiDefBut(block, LABEL, 0, title, (short)(x1), (short)y1+30, sizex, 20, NULL, 1, 0, 0, 0, "");
+ /* buttons have 0 as return event, to prevent menu to close on hotkeys */
uiBlockBeginAlign(block);
for(a=0; a<5; a++)
uiDefButBitI(block, TOGR, 1<<a, 0, "",(short)(x1+a*dx),(short)(y1+dy),(short)dx,(short)dy, lay, 0, 0, 0, 0, "");
@@ -409,7 +411,8 @@ int movetolayer_buts(unsigned int *lay)
return 0;
}
-int movetolayer_short_buts(short *lay)
+/* armature or bone */
+int movetolayer_short_buts(short *lay, char *title)
{
uiBlock *block;
ListBase listb={0, 0};
@@ -435,8 +438,10 @@ int movetolayer_short_buts(short *lay)
dx= (sizex-5)/10;
dy= sizey/2;
+ if(title)
+ uiDefBut(block, LABEL, 0, title, (short)(x1), (short)y1+30, sizex, 20, NULL, 1, 0, 0, 0, "");
+
/* buttons have 0 as return event, to prevent menu to close on hotkeys */
-
uiBlockBeginAlign(block);
for(a=0; a<8; a++)
uiDefButBitS(block, TOGR, 1<<a, 0, "",(short)(x1+a*dx),(short)(y1+dy),(short)dx,(short)dy, lay, 0, 0, 0, 0, "");