* Don't swap mouse buttons for particle painting - similar thing
authorMatt Ebb <matt@mke3.net>
Tue, 27 Nov 2007 02:13:56 +0000 (02:13 +0000)
committerMatt Ebb <matt@mke3.net>
Tue, 27 Nov 2007 02:13:56 +0000 (02:13 +0000)
was done a while ago in trunk, but this probably never made
it through to particle branch.

source/blender/src/editparticle.c
source/blender/src/space.c

index bdc15c4183ace3030755d37093fd29179764a43c..cdd122a9ae1c47e214c6d4e8538595ce1db44fbe 100644 (file)
@@ -2365,7 +2365,7 @@ int PE_brush_particles(void)
        ParticleSystemModifierData *psmd;
        ParticleBrushData *brush;
        float vec1[3], vec2[3];
-       short mval[2], mvalo[2], firsttime = 1, dx, dy, mousebut;
+       short mval[2], mvalo[2], firsttime = 1, dx, dy;
        int selected = 0, flip;
 
        if(!PE_can_edit(psys)) return 0;
@@ -2373,9 +2373,6 @@ int PE_brush_particles(void)
        edit = psys->edit;
        psmd= psys_get_modifier(ob, psys);
 
-       /* check for left mouse / right mouse button select */
-       if (U.flag & USER_LMOUSESELECT) mousebut = R_MOUSE;
-       else mousebut = L_MOUSE;
        flip= (get_qual() == LR_SHIFTKEY);
 
        if(pset->brushtype<0) return 0;
@@ -2387,7 +2384,7 @@ int PE_brush_particles(void)
 
        mval[0] = mvalo[0]; mval[1] = mvalo[1];
 
-       while(get_mbut() & mousebut){
+       while(get_mbut() & L_MOUSE){
                bglFlush();
                glReadBuffer(GL_BACK);
                glDrawBuffer(GL_BACK);
index f160c2b06ee14b03730d6755ac5402788cbf0ce0..b07b8aab0155dfa02233cad3a5104e0e15658813 100644 (file)
@@ -1185,7 +1185,7 @@ static void winqreadview3dspace(ScrArea *sa, void *spacedata, BWinEvent *evt)
                        /* only swap mouse button for selection, in modes where it is relevant.
                         * painting/sculpting stays on LEFTMOUSE */
                        if (   !((G.f & G_SCULPTMODE) || (G.f & G_WEIGHTPAINT) ||
-                               (G.f & G_VERTEXPAINT) || (G.f & G_TEXTUREPAINT)) ||
+                               (G.f & G_VERTEXPAINT) || (G.f & G_TEXTUREPAINT) || (G.f & G_PARTICLEEDIT)) ||
                                (G.obedit) )
                        {                       
                                if (event==LEFTMOUSE) event = RIGHTMOUSE;