Fix T53786: Proportional size from redo ignored

Changing PET size while transforming stores the size in the
tool settings, but changing in the redo panel didn't.
This commit is contained in:
Campbell Barton 2018-01-19 21:09:16 +11:00
parent 0cddc7e300
commit 5a61c1de82
Notes: blender-bot 2023-02-14 10:48:33 +01:00
Referenced by issue #53786, Proportional Size edit box and display/useage in viewport
1 changed files with 4 additions and 5 deletions

View File

@ -1936,7 +1936,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
}
// If modal, save settings back in scene if not set as operator argument
if (t->flag & T_MODAL) {
if ((t->flag & T_MODAL) || (op->flag & OP_IS_REPEAT)) {
/* save settings if not set in operator */
/* skip saving proportional edit if it was not actually used */
@ -1956,10 +1956,9 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op)
ts->proportional_objects = (proportional != PROP_EDIT_OFF);
}
if ((prop = RNA_struct_find_property(op->ptr, "proportional_size")) &&
!RNA_property_is_set(op->ptr, prop))
{
ts->proportional_size = t->prop_size;
if ((prop = RNA_struct_find_property(op->ptr, "proportional_size"))) {
ts->proportional_size =
RNA_property_is_set(op->ptr, prop) ? RNA_property_float_get(op->ptr, prop) : t->prop_size;
}
if ((prop = RNA_struct_find_property(op->ptr, "proportional_edit_falloff")) &&