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:
authorBrecht Van Lommel <brechtvanlommel@pandora.be>2005-06-26 19:37:36 +0400
committerBrecht Van Lommel <brechtvanlommel@pandora.be>2005-06-26 19:37:36 +0400
commitece2733c63abbdc05b9d5b32ed4ad7ed3f0700d7 (patch)
tree3fa391ac92545b37a33f4b1419f78ec8d5777019 /source/blender/src/editsima.c
parent08169d7fbaedd09bec2966c89427dfaa4fd1e78b (diff)
Patch by Martin Poirier: display normalized coordinates in image window, with
a few small modifications: - also display normalized coords while transforming - adapt step size & precision for button - moved option to 'View' menu Also made sure pixel snapping when transforming uv's is off by default.
Diffstat (limited to 'source/blender/src/editsima.c')
-rw-r--r--source/blender/src/editsima.c26
1 files changed, 16 insertions, 10 deletions
diff --git a/source/blender/src/editsima.c b/source/blender/src/editsima.c
index fc6506579ab..8cb75c59050 100644
--- a/source/blender/src/editsima.c
+++ b/source/blender/src/editsima.c
@@ -229,12 +229,8 @@ static void sima_pixelgrid(float *loc, float sx, float sy)
{
float y;
float x;
-
- if(G.sima->flag & SI_NOPIXELSNAP) {
- loc[0]= sx;
- loc[1]= sy;
- }
- else {
+
+ if(G.sima->flag & SI_PIXELSNAP) {
if(G.sima->image && G.sima->image->ibuf) {
x= G.sima->image->ibuf->x;
y= G.sima->image->ibuf->y;
@@ -256,6 +252,10 @@ static void sima_pixelgrid(float *loc, float sx, float sy)
loc[1]= sy;
}
}
+ else {
+ loc[0]= sx;
+ loc[1]= sy;
+ }
}
@@ -539,11 +539,17 @@ void transform_tface_uv(int mode, int context) // 2 args, for callback
}
}
- ivec[0]= (vec[0]*xim);
- ivec[1]= (vec[1]*yim);
-
if(G.sima->flag & SI_BE_SQUARE) be_square_tface_uv(me);
-
+
+ if (G.sima->flag & SI_COORDFLOATS) {
+ ivec[0]= vec[0];
+ ivec[1]= vec[1];
+ }
+ else {
+ ivec[0]= (vec[0]*xim);
+ ivec[1]= (vec[1]*yim);
+ }
+
sprintf(str, "X: %.4f Y: %.4f ", ivec[0], ivec[1]);
headerprint(str);
}