Transform: enable shrink-wrap even offset by default

Holding Alt now disables.
This commit is contained in:
2018-10-03 13:10:11 +10:00
parent fb8d268f62
commit e44dfbbba5
2 changed files with 6 additions and 5 deletions

View File

@@ -2211,13 +2211,14 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
{
const char *prop_id = NULL;
bool prop_state = true;
if (t->mode == TFM_SHRINKFATTEN) {
prop_id = "use_even_offset";
prop_state = false;
}
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);
RNA_property_boolean_set(op->ptr, prop, ((t->flag & T_ALT_TRANSFORM) != 0) == prop_state);
}
}
@@ -4985,7 +4986,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) {
@@ -5000,7 +5001,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)) {
if (td->ext && (t->flag & T_ALT_TRANSFORM) == 0) {
tdistance *= td->ext->isize[0]; /* shell factor */
}

View File

@@ -879,7 +879,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", false, "Offset Even", "Scale the offset to give more even thickness");
RNA_def_boolean(ot->srna, "use_even_offset", true, "Offset Even", "Scale the offset to give more even thickness");
WM_operatortype_props_advanced_begin(ot);