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_mode.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_mode.c')
-rw-r--r-- | source/blender/editors/transform/transform_mode.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/blender/editors/transform/transform_mode.c b/source/blender/editors/transform/transform_mode.c index baf4bba80df..831ea90b4e4 100644 --- a/source/blender/editors/transform/transform_mode.c +++ b/source/blender/editors/transform/transform_mode.c @@ -1271,6 +1271,12 @@ void transform_mode_init(TransInfo *t, wmOperator *op, const int mode) break; } + if (t->data_type == TC_MESH_VERTS) { + /* Init Custom Data correction. + * Ideally this should be called when creating the TransData. */ + trans_mesh_customdata_correction_init(t); + } + /* TODO(germano): Some of these operations change the `t->mode`. * This can be bad for Redo. * BLI_assert(t->mode == mode); */ |