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:
authorCampbell Barton <ideasman42@gmail.com>2011-04-21 21:25:58 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-04-21 21:25:58 +0400
commit284a0d3610b50ff45a7acdc084c21003c9af0d41 (patch)
treed47161d4a20db189cb48db6b618e16f0c8dfab7c /source/blender/editors/transform/transform.c
parent9646f8e5b15f55e2172411922a6849945d27739c (diff)
pass even mouse coords value as const so its not edited, view3d_get_view_aligned_coordinate() could modify the event->mval.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r--source/blender/editors/transform/transform.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index c710312606d..ae863efa9f7 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -2283,7 +2283,7 @@ int handleEventWarp(TransInfo *t, wmEvent *event)
return status;
}
-int Warp(TransInfo *t, short UNUSED(mval[2]))
+int Warp(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td = t->data;
float vec[3], circumfac, dist, phi0, co, si, *curs, cursor[3], gcursor[3];
@@ -2431,7 +2431,7 @@ int handleEventShear(TransInfo *t, wmEvent *event)
}
-int Shear(TransInfo *t, short UNUSED(mval[2]))
+int Shear(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td = t->data;
float vec[3];
@@ -2697,7 +2697,7 @@ static void ElementResize(TransInfo *t, TransData *td, float mat[3][3]) {
constraintTransLim(t, td);
}
-int Resize(TransInfo *t, short mval[2])
+int Resize(TransInfo *t, const short mval[2])
{
TransData *td;
float size[3], mat[3][3];
@@ -2802,7 +2802,7 @@ void initToSphere(TransInfo *t)
t->val /= (float)t->total;
}
-int ToSphere(TransInfo *t, short UNUSED(mval[2]))
+int ToSphere(TransInfo *t, const short UNUSED(mval[2]))
{
float vec[3];
float ratio, radius;
@@ -3149,7 +3149,7 @@ static void applyRotation(TransInfo *t, float angle, float axis[3])
}
}
-int Rotation(TransInfo *t, short UNUSED(mval[2]))
+int Rotation(TransInfo *t, const short UNUSED(mval[2]))
{
char str[128];
@@ -3255,7 +3255,7 @@ static void applyTrackball(TransInfo *t, float axis1[3], float axis2[3], float a
}
}
-int Trackball(TransInfo *t, short UNUSED(mval[2]))
+int Trackball(TransInfo *t, const short UNUSED(mval[2]))
{
char str[128];
float axis1[3], axis2[3];
@@ -3477,7 +3477,7 @@ static void applyTranslation(TransInfo *t, float vec[3]) {
}
/* uses t->vec to store actual translation in */
-int Translation(TransInfo *t, short UNUSED(mval[2]))
+int Translation(TransInfo *t, const short UNUSED(mval[2]))
{
char str[250];
@@ -3544,7 +3544,7 @@ void initShrinkFatten(TransInfo *t)
-int ShrinkFatten(TransInfo *t, short UNUSED(mval[2]))
+int ShrinkFatten(TransInfo *t, const short UNUSED(mval[2]))
{
float vec[3];
float distance;
@@ -3619,7 +3619,7 @@ void initTilt(TransInfo *t)
-int Tilt(TransInfo *t, short UNUSED(mval[2]))
+int Tilt(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td = t->data;
int i;
@@ -3691,7 +3691,7 @@ void initCurveShrinkFatten(TransInfo *t)
t->flag |= T_NO_CONSTRAINT;
}
-int CurveShrinkFatten(TransInfo *t, short UNUSED(mval[2]))
+int CurveShrinkFatten(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td = t->data;
float ratio;
@@ -3759,7 +3759,7 @@ void initPushPull(TransInfo *t)
}
-int PushPull(TransInfo *t, short UNUSED(mval[2]))
+int PushPull(TransInfo *t, const short UNUSED(mval[2]))
{
float vec[3], axis[3];
float distance;
@@ -3892,7 +3892,7 @@ int handleEventBevel(TransInfo *t, wmEvent *event)
return 0;
}
-int Bevel(TransInfo *t, short UNUSED(mval[2]))
+int Bevel(TransInfo *t, const short UNUSED(mval[2]))
{
float distance,d;
int i;
@@ -3960,7 +3960,7 @@ void initBevelWeight(TransInfo *t)
t->flag |= T_NO_CONSTRAINT|T_NO_PROJECT;
}
-int BevelWeight(TransInfo *t, short UNUSED(mval[2]))
+int BevelWeight(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td = t->data;
float weight;
@@ -4033,7 +4033,7 @@ void initCrease(TransInfo *t)
t->flag |= T_NO_CONSTRAINT|T_NO_PROJECT;
}
-int Crease(TransInfo *t, short UNUSED(mval[2]))
+int Crease(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td = t->data;
float crease;
@@ -4152,7 +4152,7 @@ static void ElementBoneSize(TransInfo *t, TransData *td, float mat[3][3])
td->loc[1]= oldy;
}
-int BoneSize(TransInfo *t, short mval[2])
+int BoneSize(TransInfo *t, const short mval[2])
{
TransData *td = t->data;
float size[3], mat[3][3];
@@ -4228,7 +4228,7 @@ void initBoneEnvelope(TransInfo *t)
t->flag |= T_NO_CONSTRAINT|T_NO_PROJECT;
}
-int BoneEnvelope(TransInfo *t, short UNUSED(mval[2]))
+int BoneEnvelope(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td = t->data;
float ratio;
@@ -4962,7 +4962,7 @@ int doEdgeSlide(TransInfo *t, float perc)
return 1;
}
-int EdgeSlide(TransInfo *t, short UNUSED(mval[2]))
+int EdgeSlide(TransInfo *t, const short UNUSED(mval[2]))
{
char str[50];
float final;
@@ -5021,7 +5021,7 @@ void initBoneRoll(TransInfo *t)
t->flag |= T_NO_CONSTRAINT|T_NO_PROJECT;
}
-int BoneRoll(TransInfo *t, short UNUSED(mval[2]))
+int BoneRoll(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td = t->data;
int i;
@@ -5082,7 +5082,7 @@ void initBakeTime(TransInfo *t)
t->num.increment = t->snap[1];
}
-int BakeTime(TransInfo *t, short mval[2])
+int BakeTime(TransInfo *t, const short mval[2])
{
TransData *td = t->data;
float time;
@@ -5157,7 +5157,7 @@ void initMirror(TransInfo *t)
}
}
-int Mirror(TransInfo *t, short UNUSED(mval[2]))
+int Mirror(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td;
float size[3], mat[3][3];
@@ -5234,7 +5234,7 @@ void initAlign(TransInfo *t)
initMouseInputMode(t, &t->mouse, INPUT_NONE);
}
-int Align(TransInfo *t, short UNUSED(mval[2]))
+int Align(TransInfo *t, const short UNUSED(mval[2]))
{
TransData *td = t->data;
float center[3];
@@ -5337,7 +5337,7 @@ static void applySeqSlide(TransInfo *t, float val[2]) {
}
}
-int SeqSlide(TransInfo *t, short UNUSED(mval[2]))
+int SeqSlide(TransInfo *t, const short UNUSED(mval[2]))
{
char str[200];
@@ -5627,7 +5627,7 @@ static void applyTimeTranslate(TransInfo *t, float UNUSED(sval))
}
}
-int TimeTranslate(TransInfo *t, short mval[2])
+int TimeTranslate(TransInfo *t, const short mval[2])
{
View2D *v2d = (View2D *)t->view;
float cval[2], sval[2];
@@ -5757,7 +5757,7 @@ static void applyTimeSlide(TransInfo *t, float sval)
}
}
-int TimeSlide(TransInfo *t, short mval[2])
+int TimeSlide(TransInfo *t, const short mval[2])
{
View2D *v2d = (View2D *)t->view;
float cval[2], sval[2];
@@ -5882,7 +5882,7 @@ static void applyTimeScale(TransInfo *t) {
}
}
-int TimeScale(TransInfo *t, short UNUSED(mval[2]))
+int TimeScale(TransInfo *t, const short UNUSED(mval[2]))
{
char str[200];