Page MenuHome

toggle_layers_menu.patch

toggle_layers_menu.patch

Index: /home/dave/development/workspace/blender/source/blender/src/header_view3d.c
===================================================================
--- /home/dave/development/workspace/blender/source/blender/src/header_view3d.c (revision 12210)
+++ /home/dave/development/workspace/blender/source/blender/src/header_view3d.c (working copy)
@@ -164,9 +164,9 @@
if(event==-1 && (G.qual & LR_CTRLKEY)) {
G.vd->scenelock= !G.vd->scenelock;
do_view3d_buttons(B_SCENELOCK);
- } else if (event==-1) {
+ } else if (event<0) {
if(G.vd->lay== (1<<20)-1) {
- if(G.qual & LR_SHIFTKEY) G.vd->lay= oldlay;
+ if(event==-2 || G.qual & LR_SHIFTKEY) G.vd->lay= oldlay;
}
else {
oldlay= G.vd->lay;
@@ -597,6 +597,9 @@
case 19: /* zoom within border */
view3d_border_zoom();
break;
+ case 20:
+ do_layer_buttons(-2);
+ break;
}
allqueue(REDRAWVIEW3D, 1);
}
@@ -631,6 +634,11 @@
uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+ if(G.vd->lay== (1<<20)-1) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "View All Layers|Shift ~", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 20, "");
+ else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "View All Layers|Shift ~", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 20, "");
+
+ uiDefBut(block, SEPR, 0, "", 0, yco-=6, menuwidth, 6, NULL, 0.0, 0.0, 0, 0, "");
+
if(G.vd->persp==1) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Perspective|NumPad 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
else uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_DEHLT, "Perspective|NumPad 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 5, "");
if(G.vd->persp==0) uiDefIconTextBut(block, BUTM, 1, ICON_CHECKBOX_HLT, "Orthographic|NumPad 5", 0, yco-=20, menuwidth, 19, NULL, 0.0, 0.0, 0, 6, "");
Index: /home/dave/development/workspace/blender/source/blender/src/toolbox.c
===================================================================
--- /home/dave/development/workspace/blender/source/blender/src/toolbox.c (revision 12210)
+++ /home/dave/development/workspace/blender/source/blender/src/toolbox.c (working copy)
@@ -128,8 +128,6 @@
void asciitoraw(int ch, unsigned short *event, unsigned short *qual)
{
- if( isalpha(ch)==0 ) return;
-
if( isupper(ch) ) {
*qual= LEFTSHIFTKEY;
ch= tolower(ch);
@@ -805,7 +803,10 @@
case 'd': key= PAGEDOWNKEY; break;
}
}
- else asciitoraw(event, &key, &qual[3]);
+ else if (isalpha(event))
+ asciitoraw(event, &key, &qual[3]);
+ else if (event == '~')
+ key = ACCENTGRAVEKEY;
for (i=0;i<4;i++)
{
@@ -1212,6 +1213,8 @@
{ 0, "Ortho/Perspective|NumPad 5", TB_PAD|'5', NULL},
{ 0, "Local/Global View|NumPad /", TB_PAD|'/', NULL},
{ 0, "SEPR", 0, NULL},
+{ 0, "View All/Previous Layers|Shift ~", TB_SHIFT|'~', NULL},
+{ 0, "SEPR", 0, NULL},
{ 0, "Align View", 0, tb_view_alignview},
{ 0, "SEPR", 0, NULL},
{ 0, "View Selected|NumPad .", TB_PAD|'.', NULL},

File Metadata

Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
7e/f5/f616fb8697a5f2350d18b9523819

Event Timeline