Transform: default shrink/fatten even-offset to false
authorCampbell Barton <ideasman42@gmail.com>
Thu, 3 Jan 2019 04:13:46 +0000 (15:13 +1100)
committerCampbell Barton <ideasman42@gmail.com>
Thu, 3 Jan 2019 04:13:46 +0000 (15:13 +1100)
Changed for 2.8 but this cases spikes for some geometry, see: T59968

source/blender/editors/transform/transform.c
source/blender/editors/transform/transform_generics.c
source/blender/editors/transform/transform_ops.c

index 7509b88ccff7f7d8fa2a936073cf39c34acf7434..f7a27571b64ec48591e9bb8bcf907acf7695ac9f 100644 (file)
@@ -2223,7 +2223,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
                }
 
                if (prop_id && (prop = RNA_struct_find_property(op->ptr, prop_id))) {
-                       RNA_property_boolean_set(op->ptr, prop, ((t->flag & T_ALT_TRANSFORM) != 0) == prop_state);
+                       RNA_property_boolean_set(op->ptr, prop, ((t->flag & T_ALT_TRANSFORM) == 0) == prop_state);
                }
        }
 
@@ -5050,7 +5050,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
                }
        }
        BLI_snprintf(str + ofs, sizeof(str) - ofs, IFACE_(" or Alt) Even Thickness %s"),
-                    WM_bool_as_string((t->flag & T_ALT_TRANSFORM) == 0));
+                    WM_bool_as_string((t->flag & T_ALT_TRANSFORM) != 0));
        /* done with header string */
 
        FOREACH_TRANS_DATA_CONTAINER (t, tc) {
@@ -5065,7 +5065,7 @@ static void applyShrinkFatten(TransInfo *t, const int UNUSED(mval[2]))
 
                        /* get the final offset */
                        tdistance = distance * td->factor;
-                       if (td->ext && (t->flag & T_ALT_TRANSFORM) == 0) {
+                       if (td->ext && (t->flag & T_ALT_TRANSFORM) != 0) {
                                tdistance *= td->ext->isize[0];  /* shell factor */
                        }
 
index 11931160fca434873fc300d377bbecde7893b129..882ef9e730168c80a1add76e9de13e927431eb20 100644 (file)
@@ -1374,7 +1374,7 @@ void initTransInfo(bContext *C, TransInfo *t, wmOperator *op, const wmEvent *eve
                }
 
                if (prop_id && (prop = RNA_struct_find_property(op->ptr, prop_id))) {
-                       SET_FLAG_FROM_TEST(t->flag, !RNA_property_boolean_get(op->ptr, prop), T_ALT_TRANSFORM);
+                       SET_FLAG_FROM_TEST(t->flag, RNA_property_boolean_get(op->ptr, prop), T_ALT_TRANSFORM);
                }
        }
 
index 5a3575c04d98dccc79800998a82ae8d23033c8ff..6bef5e4671aa93cf62cc7c558979da4c5cbf0837 100644 (file)
@@ -896,7 +896,7 @@ static void TRANSFORM_OT_shrink_fatten(struct wmOperatorType *ot)
 
        RNA_def_float(ot->srna, "value", 0, -FLT_MAX, FLT_MAX, "Offset", "", -FLT_MAX, FLT_MAX);
 
-       RNA_def_boolean(ot->srna, "use_even_offset", true, "Offset Even", "Scale the offset to give more even thickness");
+       RNA_def_boolean(ot->srna, "use_even_offset", false, "Offset Even", "Scale the offset to give more even thickness");
 
        WM_operatortype_props_advanced_begin(ot);