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:
authorBastien Montagne <montagne29@wanadoo.fr>2014-07-21 19:13:48 +0400
committerBastien Montagne <montagne29@wanadoo.fr>2014-07-21 19:13:48 +0400
commit15266204164fe94074a1a4867d9ff01d71d02e0d (patch)
treec6b70962065d8ee34a9d4929d3b025bc88ab27df /source/blender/editors/util/numinput.c
parent6a43ee6e387824350f89e77f33c8907ff21d64ef (diff)
Fix T40432: Scaling to zero with manipulate center points works precisely on second time
Commented out the 'no zero' protection of scaling transforms for numinput. Issue is, once an axis has null scale, you can't regrow it from transform code (you have to directly edit the scale property). This is not ideal, but getting good behavior in this case is hairy... Yet, when using numinput, you type precise values, so if you want to set it to zero, set it to zero. User is assumed responsible, we should avoid too much 'invisible magic' when handling precise inputs. ;) Note: an idea for possible future feature would be to have an 'absolute' mode for numinput (allowing to type in real value, not factors).
Diffstat (limited to 'source/blender/editors/util/numinput.c')
-rw-r--r--source/blender/editors/util/numinput.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/util/numinput.c b/source/blender/editors/util/numinput.c
index 2c3dff5ea6a..fd8f16f5d02 100644
--- a/source/blender/editors/util/numinput.c
+++ b/source/blender/editors/util/numinput.c
@@ -189,15 +189,15 @@ bool applyNumInput(NumInput *n, float *vec)
if (n->val_flag[i] & NUM_NO_NEGATIVE && val < 0.0f) {
val = 0.0f;
}
- if (n->val_flag[i] & NUM_NO_ZERO && val == 0.0f) {
- val = 0.0001f;
- }
if (n->val_flag[i] & NUM_NO_FRACTION && val != floorf(val)) {
val = floorf(val + 0.5f);
if (n->val_flag[i] & NUM_NO_ZERO && val == 0.0f) {
val = 1.0f;
}
}
+ else if (n->val_flag[i] & NUM_NO_ZERO && val == 0.0f) {
+ val = 0.0001f;
+ }
}
vec[j] = val;
}