diff options
author | Germano Cavalcante <germano.costa@ig.com.br> | 2020-07-01 10:45:27 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-07-01 10:49:38 +0300 |
commit | 4387aff99e01c412a360d412bf78d8bc913d4401 (patch) | |
tree | e8a90e776fc80d3952cc0e62bf887ea601a3ce99 /source/blender/editors/transform/transform.c | |
parent | 8d3c4aa2d734fe9ff342b9bacff832993b60e89a (diff) |
Transform: generalized custom-data correction support
Support custom-data correction based on surrounding geometry for all
transformation modes of the mesh transform operators.
The is the same logic used in Vert and Edge Slide.
In order not to change the current default behavior,
this property does not affect Vert and Edge Slide modes.
Diffstat (limited to 'source/blender/editors/transform/transform.c')
-rw-r--r-- | source/blender/editors/transform/transform.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/source/blender/editors/transform/transform.c b/source/blender/editors/transform/transform.c index b9e6258c1ba..eb60273fc79 100644 --- a/source/blender/editors/transform/transform.c +++ b/source/blender/editors/transform/transform.c @@ -526,8 +526,11 @@ static void viewRedrawPost(bContext *C, TransInfo *t) } /* redraw UV editor */ - if (ELEM(t->mode, TFM_VERT_SLIDE, TFM_EDGE_SLIDE) && - (t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT)) { + const char uvcalc_correct_flag = ELEM(t->mode, TFM_VERT_SLIDE, TFM_EDGE_SLIDE) ? + UVCALC_TRANSFORM_CORRECT_SLIDE : + UVCALC_TRANSFORM_CORRECT; + + if ((t->data_type == TC_MESH_VERTS) && (t->settings->uvcalc_flag & uvcalc_correct_flag)) { WM_event_add_notifier(C, NC_GEOM | ND_DATA, NULL); } @@ -1784,7 +1787,7 @@ void saveTransform(bContext *C, TransInfo *t, wmOperator *op) if ((prop = RNA_struct_find_property(op->ptr, "correct_uv"))) { RNA_property_boolean_set( - op->ptr, prop, (t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT) != 0); + op->ptr, prop, (t->settings->uvcalc_flag & UVCALC_TRANSFORM_CORRECT_SLIDE) != 0); } } |