Fix 'Correct Face Attributes' option

With this option enabled, updating the geometry is no longer deform only.
This commit is contained in:
Germano Cavalcante 2021-07-13 12:51:29 -03:00
parent 2373a2196e
commit 52b94049f2
1 changed files with 6 additions and 1 deletions

View File

@ -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);
}