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:
-rw-r--r--source/blender/editors/transform/transform.c8
-rw-r--r--source/blender/editors/util/numinput.c6
2 files changed, 11 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c
index bc721af231e..09e9894dd2d 100644
--- a/source/blender/editors/transform/transform.c
+++ b/source/blender/editors/transform/transform.c
@@ -3113,9 +3113,11 @@ static void initResize(TransInfo *t)
t->num.flag |= NUM_AFFECT_ALL;
if (!t->obedit) {
t->flag |= T_NO_ZERO;
+#if 0 /* Disabling, since when you type you know what you are doing, and being able to set it to zero is handy. */
t->num.val_flag[0] |= NUM_NO_ZERO;
t->num.val_flag[1] |= NUM_NO_ZERO;
t->num.val_flag[2] |= NUM_NO_ZERO;
+#endif
}
t->idx_max = 2;
@@ -3405,9 +3407,11 @@ static void initSkinResize(TransInfo *t)
t->num.flag |= NUM_AFFECT_ALL;
if (!t->obedit) {
t->flag |= T_NO_ZERO;
+#if 0 /* Disabling, since when you type you know what you are doing, and being able to set it to zero is handy. */
t->num.val_flag[0] |= NUM_NO_ZERO;
t->num.val_flag[1] |= NUM_NO_ZERO;
t->num.val_flag[2] |= NUM_NO_ZERO;
+#endif
}
t->idx_max = 2;
@@ -4515,7 +4519,9 @@ static void initCurveShrinkFatten(TransInfo *t)
t->num.unit_type[0] = B_UNIT_NONE;
t->flag |= T_NO_ZERO;
+#if 0 /* Disabling, since when you type you know what you are doing, and being able to set it to zero is handy. */
t->num.val_flag[0] |= NUM_NO_ZERO;
+#endif
t->flag |= T_NO_CONSTRAINT;
}
@@ -4590,7 +4596,9 @@ static void initMaskShrinkFatten(TransInfo *t)
t->num.unit_type[0] = B_UNIT_NONE;
t->flag |= T_NO_ZERO;
+#if 0 /* Disabling, since when you type you know what you are doing, and being able to set it to zero is handy. */
t->num.val_flag[0] |= NUM_NO_ZERO;
+#endif
t->flag |= T_NO_CONSTRAINT;
}
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;
}