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:
authorMatt Ebb <matt@mke3.net>2004-07-16 05:34:19 +0400
committerMatt Ebb <matt@mke3.net>2004-07-16 05:34:19 +0400
commit688a6de8789989522d1faf61349fc864b962137e (patch)
tree79f005679d1ab69037c520e5ef7cd9973e660be4 /source/blender/src/vpaint.c
parente926d392a8dbfc06bbd1670ce11a750ce15a1170 (diff)
* User preference to select with the left mouse button
instead of right. This basically swaps left and right, in most window spaces so you can choose between: LMB: Cursor/time slider/paint - RMB: Select or LMB: Select - RMB: Cursor/time slider/paint Aimed at: 1. Newbies 2. 1 button mouse mac users 3. People like me who are sick of having to constantly keep putting their brains into different modes when switching between other apps and Blender :) Yes, the User Preferences window is a bit of a nightmare now, a layout cleanup will be forthcoming soon...
Diffstat (limited to 'source/blender/src/vpaint.c')
-rw-r--r--source/blender/src/vpaint.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/source/blender/src/vpaint.c b/source/blender/src/vpaint.c
index 0a02efedcf5..018d04bd3e2 100644
--- a/source/blender/src/vpaint.c
+++ b/source/blender/src/vpaint.c
@@ -58,6 +58,7 @@
#include "DNA_screen_types.h"
#include "DNA_scene_types.h"
#include "DNA_view3d_types.h"
+#include "DNA_userdef_types.h"
#include "BKE_utildefines.h"
#include "BKE_mesh.h"
@@ -778,7 +779,7 @@ void weight_paint(void)
TFace *tface;
float mat[4][4], imat[4][4];
int index, totindex;
- short mval[2], mvalo[2], firsttime=1;
+ short mval[2], mvalo[2], firsttime=1, mousebut;
MDeformWeight *dw, *uw;
extern float editbutvweight;
DispList *dl;
@@ -819,7 +820,10 @@ void weight_paint(void)
mvalo[0]= mval[0];
mvalo[1]= mval[1];
- while (get_mbut() & L_MOUSE) {
+ if (U.flag & USER_LMOUSESELECT) mousebut = R_MOUSE;
+ else mousebut = L_MOUSE;
+
+ while (get_mbut() & mousebut) {
getmouseco_areawin(mval);
if(firsttime || mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {
@@ -942,7 +946,7 @@ void vertex_paint()
float mat[4][4], imat[4][4];
unsigned int paintcol=0, *mcol, fcol1, fcol2;
int index, alpha, totindex, total;
- short mval[2], mvalo[2], firsttime=1;
+ short mval[2], mvalo[2], firsttime=1, mousebut;
if((G.f & G_VERTEXPAINT)==0) return;
if(G.obedit) return;
@@ -980,7 +984,10 @@ void vertex_paint()
mvalo[0]= mval[0];
mvalo[1]= mval[1];
- while (get_mbut() & L_MOUSE) {
+ if (U.flag & USER_LMOUSESELECT) mousebut = R_MOUSE;
+ else mousebut = L_MOUSE;
+
+ while (get_mbut() & mousebut) {
getmouseco_areawin(mval);
if(firsttime || mval[0]!=mvalo[0] || mval[1]!=mvalo[1]) {