From 577bdfbb5b7be71d0d709595b99ef75308a8183e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Tue, 22 Jul 2014 01:24:43 +1000 Subject: Transform: edit to recent commit Copying long comments about & `#if 0` is hint it could be defined in one place. --- source/blender/editors/transform/transform.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index 09e9894dd2d..58dee620a61 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -86,6 +86,9 @@ #include "transform.h" +/* Disabling, since when you type you know what you are doing, and being able to set it to zero is handy. */ +// #define USE_NUM_NO_ZERO + #define MAX_INFO_LEN 256 static void drawTransformApply(const struct bContext *C, ARegion *ar, void *arg); @@ -3113,7 +3116,7 @@ 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. */ +#ifdef USE_NUM_NO_ZERO t->num.val_flag[0] |= NUM_NO_ZERO; t->num.val_flag[1] |= NUM_NO_ZERO; t->num.val_flag[2] |= NUM_NO_ZERO; @@ -3407,7 +3410,7 @@ 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. */ +#ifdef USE_NUM_NO_ZERO t->num.val_flag[0] |= NUM_NO_ZERO; t->num.val_flag[1] |= NUM_NO_ZERO; t->num.val_flag[2] |= NUM_NO_ZERO; @@ -4519,7 +4522,7 @@ 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. */ +#ifdef USE_NUM_NO_ZERO t->num.val_flag[0] |= NUM_NO_ZERO; #endif @@ -4596,7 +4599,7 @@ 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. */ +#ifdef USE_NUM_NO_ZERO t->num.val_flag[0] |= NUM_NO_ZERO; #endif -- cgit v1.2.3