Transform: use ID_RECALC_GEOMETRY flag when updating object data
While this doesn't provide any noticeable benefits at the moment, it allows for geometry updates skipping copy-on-write in edit-mode in the future.
This commit is contained in:
parent
b13953b1f2
commit
2b640622ff
Notes:
blender-bot
2023-02-14 06:45:14 +01:00
Referenced by issue #88550, Mesh Optimization Project Progress
|
@ -449,7 +449,7 @@ void recalcData_curve(TransInfo *t)
|
|||
ListBase *nurbs = BKE_curve_editNurbs_get(cu);
|
||||
Nurb *nu = nurbs->first;
|
||||
|
||||
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
|
||||
DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY);
|
||||
|
||||
if (t->state == TRANS_CANCEL) {
|
||||
while (nu) {
|
||||
|
|
|
@ -122,7 +122,7 @@ void recalcData_lattice(TransInfo *t)
|
|||
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
Lattice *la = tc->obedit->data;
|
||||
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
|
||||
DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY);
|
||||
if (la->editlatt->latt->flag & LT_OUTSIDE) {
|
||||
outside_lattice(la->editlatt->latt);
|
||||
}
|
||||
|
|
|
@ -142,7 +142,7 @@ void recalcData_mball(TransInfo *t)
|
|||
}
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
if (tc->data_len) {
|
||||
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
|
||||
DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1676,7 +1676,7 @@ void recalcData_mesh(TransInfo *t)
|
|||
}
|
||||
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
|
||||
DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY);
|
||||
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
|
||||
EDBM_mesh_normals_update(em);
|
||||
BKE_editmesh_looptri_calc(em);
|
||||
|
|
|
@ -298,7 +298,7 @@ void recalcData_mesh_skin(TransInfo *t)
|
|||
}
|
||||
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
DEG_id_tag_update(tc->obedit->data, 0); /* sets recalc flags */
|
||||
DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY);
|
||||
BMEditMesh *em = BKE_editmesh_from_object(tc->obedit);
|
||||
EDBM_mesh_normals_update(em);
|
||||
BKE_editmesh_looptri_calc(em);
|
||||
|
|
|
@ -475,7 +475,7 @@ void recalcData_uv(TransInfo *t)
|
|||
|
||||
FOREACH_TRANS_DATA_CONTAINER (t, tc) {
|
||||
if (tc->data_len) {
|
||||
DEG_id_tag_update(tc->obedit->data, 0);
|
||||
DEG_id_tag_update(tc->obedit->data, ID_RECALC_GEOMETRY);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ void ED_transverts_update_obedit(TransVertStore *tvs, Object *obedit)
|
|||
const int mode = tvs->mode;
|
||||
BLI_assert(ED_transverts_check_obedit(obedit) == true);
|
||||
|
||||
DEG_id_tag_update(obedit->data, 0);
|
||||
DEG_id_tag_update(obedit->data, ID_RECALC_GEOMETRY);
|
||||
|
||||
if (obedit->type == OB_MESH) {
|
||||
BMEditMesh *em = BKE_editmesh_from_object(obedit);
|
||||
|
|
Loading…
Reference in New Issue