diff options
Diffstat (limited to 'source/blender/editors/transform/transform_mode_gpshrinkfatten.c')
-rw-r--r-- | source/blender/editors/transform/transform_mode_gpshrinkfatten.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_mode_gpshrinkfatten.c b/source/blender/editors/transform/transform_mode_gpshrinkfatten.c index c025dbcaccb..533e327a489 100644 --- a/source/blender/editors/transform/transform_mode_gpshrinkfatten.c +++ b/source/blender/editors/transform/transform_mode_gpshrinkfatten.c @@ -29,6 +29,8 @@ #include "BKE_context.h" #include "BKE_unit.h" +#include "DNA_gpencil_types.h" + #include "ED_screen.h" #include "UI_interface.h" @@ -70,8 +72,16 @@ static void applyGPShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) BLI_snprintf(str, sizeof(str), TIP_("Shrink/Fatten: %3f"), ratio); } + bool recalc = false; FOREACH_TRANS_DATA_CONTAINER (t, tc) { TransData *td = tc->data; + bGPdata *gpd = td->ob->data; + const bool is_curve_edit = (bool)GPENCIL_CURVE_EDIT_SESSIONS_ON(gpd); + /* Only recalculate data when in curve edit mode. */ + if (is_curve_edit) { + recalc = true; + } + for (i = 0; i < tc->data_len; i++, td++) { if (td->flag & TD_SKIP) { continue; @@ -88,6 +98,10 @@ static void applyGPShrinkFatten(TransInfo *t, const int UNUSED(mval[2])) } } + if (recalc) { + recalcData(t); + } + ED_area_status_text(t->area, str); } |