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:
authorMartin Poirier <theeth@yahoo.com>2005-08-23 22:13:30 +0400
committerMartin Poirier <theeth@yahoo.com>2005-08-23 22:13:30 +0400
commite12e2469c8e2e0f0229af5bbc611ea76238d6d34 (patch)
tree9e59a65aa7d77db81d49a2cc66b88ca331b4c9af /source/blender/src/transform_numinput.c
parent207cbbd535743e2505ce5f66d91f3d771800e0c5 (diff)
Bretch's patch for 2D transform. Thanks
Using new transform code to handle UV window. With the ground work done, Transform could more easily be extended to handle IPO window now. Tracker item: http://projects.blender.org/tracker/?func=detail&atid=127&aid=2946&group_id=9
Diffstat (limited to 'source/blender/src/transform_numinput.c')
-rwxr-xr-xsource/blender/src/transform_numinput.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/source/blender/src/transform_numinput.c b/source/blender/src/transform_numinput.c
index 6c254697011..aa35af7d312 100755
--- a/source/blender/src/transform_numinput.c
+++ b/source/blender/src/transform_numinput.c
@@ -103,8 +103,11 @@ short hasNumInput(NumInput *n)
void applyNumInput(NumInput *n, float *vec)
{
short i, j;
+ float val[3];
if (hasNumInput(n)) {
+ convertDisplayNumToVec(n->val, val);
+
for (j=0; j<=n->idx_max; j++) {
/* if AFFECTALL and no number typed and cursor not on number, use first number */
if (n->flag & NUM_AFFECT_ALL && n->idx != j && n->ctrl[j] == 0)
@@ -115,11 +118,11 @@ void applyNumInput(NumInput *n, float *vec)
if (n->ctrl[i] == 0 && n->flag & NUM_NULL_ONE) {
vec[j] = 1.0f;
}
- else if (n->val[i] == 0.0f && n->flag & NUM_NO_ZERO) {
+ else if (val[i] == 0.0f && n->flag & NUM_NO_ZERO) {
vec[j] = 0.0001f;
}
else {
- vec[j] = n->val[i];
+ vec[j] = val[i];
}
}
}