diff --git a/source/blender/blenkernel/intern/blender.c b/source/blender/blenkernel/intern/blender.c index 3408b2781b8..ed53ff471bb 100644 --- a/source/blender/blenkernel/intern/blender.c +++ b/source/blender/blenkernel/intern/blender.c @@ -272,6 +272,10 @@ static void setup_app_data(BlendFileData *bfd, char *filename) { U.menuthreshold1= 5; U.menuthreshold2= 2; } + if(U.tb_leftmouse==0) { + U.tb_leftmouse= 5; + U.tb_rightmouse= 5; + } } R.winpos= bfd->winpos; diff --git a/source/blender/makesdna/DNA_userdef_types.h b/source/blender/makesdna/DNA_userdef_types.h index 35d46fead4b..412bac6843c 100644 --- a/source/blender/makesdna/DNA_userdef_types.h +++ b/source/blender/makesdna/DNA_userdef_types.h @@ -140,7 +140,8 @@ typedef struct UserDef { short menuthreshold1, menuthreshold2; char fontname[64]; struct ListBase themes; - short undosteps, pad0[3]; + short undosteps, pad0; + short tb_leftmouse, tb_rightmouse; struct SolidLight light[3]; } UserDef; diff --git a/source/blender/src/editobject.c b/source/blender/src/editobject.c index 139311eb512..c2c5af22637 100644 --- a/source/blender/src/editobject.c +++ b/source/blender/src/editobject.c @@ -5507,7 +5507,7 @@ void std_rmouse_transform(void (*xf_func)(int)) else { PIL_sleep_ms(10); timer++; - if(timer>=10*U.menuthreshold1) { + if(timer>=10*U.tb_rightmouse) { toolbox_n(); return; } diff --git a/source/blender/src/editscreen.c b/source/blender/src/editscreen.c index 0e30ce6fb68..7bb862b5b9a 100644 --- a/source/blender/src/editscreen.c +++ b/source/blender/src/editscreen.c @@ -2225,7 +2225,7 @@ static short testsplitpoint(ScrArea *sa, char dir, float fac) static void splitarea(ScrArea *sa, char dir, float fac) { bScreen *sc; - ScrArea *newa; + ScrArea *newa=NULL; ScrVert *sv1, *sv2; short split; @@ -2280,6 +2280,11 @@ static void splitarea(ScrArea *sa, char dir, float fac) sa->v2= sv2; } + if(sa->spacetype==SPACE_BUTS) { + addqueue(sa->win, UI_BUT_EVENT, B_BUTSHOME); + addqueue(newa->win, UI_BUT_EVENT, B_BUTSHOME); + } + /* remove double vertices en edges */ removedouble_scrverts(); removedouble_scredges(); diff --git a/source/blender/src/editview.c b/source/blender/src/editview.c index e16dc7d9cfd..30271e300cb 100644 --- a/source/blender/src/editview.c +++ b/source/blender/src/editview.c @@ -252,7 +252,7 @@ int gesture(void) /* not drawing yet... check for toolbox */ PIL_sleep_ms(10); timer++; - if(timer>=10*U.menuthreshold1) { + if(timer>=10*U.tb_leftmouse) { toolbox_n(); return 1; } diff --git a/source/blender/src/space.c b/source/blender/src/space.c index c4c8c6bd93e..35a007e69ce 100644 --- a/source/blender/src/space.c +++ b/source/blender/src/space.c @@ -2001,7 +2001,38 @@ void drawinfospace(ScrArea *sa, void *spacedata) (xpos+edgespace+medprefbut+(4*midspace)+(3*smallprefbut)),y1,smallprefbut,buth, &(U.menuthreshold2), 1, 40, 0, 0, "Time in 1/10 seconds for auto open sublevels"); + + + uiDefBut(block, LABEL,0,"Toolbox Thresh.:", + (xpos+edgespace+(3*midspace)+(3*medprefbut)),y3label,medprefbut,buth, + 0, 0, 0, 0, 0, ""); + + uiDefButS(block, NUM, 0, "LMB:", + (xpos+edgespace+(3*midspace)+(3*medprefbut)),y2,smallprefbut,buth, + &(U.tb_leftmouse), 2, 40, 0, 0, + "Time in 1/10 seconds leftmouse hold to open toolbox"); + + uiDefButS(block, NUM, 0, "RMB:", + (xpos+edgespace+(3*midspace)+(3*medprefbut)),y1,smallprefbut,buth, + &(U.tb_rightmouse), 2, 40, 0, 0, + "Time in 1/10 seconds for rightmouse to open toolbox"); + + uiDefBut(block, LABEL,0,"View rotation:", + (xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y3label,medprefbut,buth, + 0, 0, 0, 0, 0, ""); + + uiDefButS(block, TOG|BIT|5, B_DRAWINFO, "Trackball", + (xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y2,(smallprefbut+2),buth, + &(U.flag), 0, 0, 0, 0, + "Use trackball style rotation with middle mouse button"); + + uiDefButS(block, TOGN|BIT|5, B_DRAWINFO, "Turntable", + (xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y1,(smallprefbut+2),buth, + &(U.flag), 0, 0, 0, 0, + "Use turntable style rotation with middle mouse button"); + + uiDefButS(block, TOGN|BIT|10, B_DRAWINFO, "Rotate View", (xpos+edgespace+(4*midspace)+(4*medprefbut)),y2,(smallprefbut+2),buth, @@ -2021,19 +2052,6 @@ void drawinfospace(ScrArea *sa, void *spacedata) - uiDefBut(block, LABEL,0,"View rotation method:", - (xpos+edgespace+(3*midspace)+(3*medprefbut)),y3label,medprefbut,buth, - 0, 0, 0, 0, 0, ""); - - uiDefButS(block, TOG|BIT|5, B_DRAWINFO, "Trackball", - (xpos+edgespace+(3*midspace)+(3*medprefbut)),y2,(smallprefbut+2),buth, - &(U.flag), 0, 0, 0, 0, - "Use trackball style rotation with middle mouse button"); - - uiDefButS(block, TOGN|BIT|5, B_DRAWINFO, "Turntable", - (xpos+edgespace+(3*midspace)+(3*medprefbut)+smallprefbut+2),y2,(smallprefbut+2),buth, - &(U.flag), 0, 0, 0, 0, - "Use turntable style rotation with middle mouse button"); uiDefBut(block, LABEL,0,"Mousewheel:", (xpos+edgespace+(4*midspace)+(5*medprefbut)),y3label,medprefbut,buth,