From 4387aff99e01c412a360d412bf78d8bc913d4401 Mon Sep 17 00:00:00 2001 From: Germano Cavalcante Date: Wed, 1 Jul 2020 17:45:27 +1000 Subject: 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. --- source/blender/editors/transform/transform_mode.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source/blender/editors/transform/transform_mode.c') 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); */ -- cgit v1.2.3