Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGermano Cavalcante <germano.costa@ig.com.br>2021-07-13 18:51:29 +0300
committerGermano Cavalcante <germano.costa@ig.com.br>2021-07-13 18:51:29 +0300
commit52b94049f2a71a74f52247f83657cf3a5c8712b4 (patch)
tree6033af99180e2397153b33c324ee691278e7b5fa /source/blender/editors/transform/transform_convert_mesh.c
parent2373a2196e21b35998961fff2f53c5fa98036cd8 (diff)
Fix 'Correct Face Attributes' option
With this option enabled, updating the geometry is no longer deform only.
Diffstat (limited to 'source/blender/editors/transform/transform_convert_mesh.c')
-rw-r--r--source/blender/editors/transform/transform_convert_mesh.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source/blender/editors/transform/transform_convert_mesh.c b/source/blender/editors/transform/transform_convert_mesh.c
index 18cd62a0baf..d740f7e3adb 100644
--- a/source/blender/editors/transform/transform_convert_mesh.c
+++ b/source/blender/editors/transform/transform_convert_mesh.c
@@ -2094,7 +2094,12 @@ void recalcData_mesh(TransInfo *t)
tc_mesh_partial_types_calc(t, &partial_state);
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
- DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY_DEFORM);
+ const bool use_cd_layer_correct =
+ tc->custom.type.data &&
+ ((struct TransCustomDataMesh *)tc->custom.type.data)->cd_layer_correct;
+
+ DEG_id_tag_update(tc->obedit->data,
+ use_cd_layer_correct ? ID_RECALC_GEOMETRY : ID_RECALC_GEOMETRY_DEFORM);
tc_mesh_partial_update(t, tc, &partial_state);
}