Fix #123624: no geometry after applying visual geometry to mesh

This happened because `BKE_object_get_evaluated_mesh` now only returns
the mesh if there are no pending depsgraph updates. However, given that the
ID was tagged for changes before the evaluated mesh was accessed, it looked
like there were missing updates when there were not.

Now the depsgraph tag is only set after the object has actually been modified.
This commit is contained in:
Jacques Lucke 2024-06-26 14:00:05 +02:00
parent 1dd017ac62
commit 29f6167db1

@ -3473,7 +3473,6 @@ static int object_convert_exec(bContext *C, wmOperator *op)
}
else {
newob = ob;
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
}
/* make new mesh data from the original copy */
@ -3495,6 +3494,10 @@ static int object_convert_exec(bContext *C, wmOperator *op)
BKE_mesh_nomain_to_mesh(new_mesh, ob_data_mesh, newob);
BKE_object_free_modifiers(newob, 0); /* after derivedmesh calls! */
if (!keep_original) {
DEG_id_tag_update(&ob->id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION);
}
}
else if (ob->type == OB_FONT) {
ob->flag |= OB_DONE;