From da1140f75e08ac5228474e5cdbb995ec7c0df579 Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Fri, 28 Feb 2020 12:59:18 +0100 Subject: Revert "Objects: make evaluated data runtime storage usable for types other than mesh" This reverts commit f2b95b9eae2ee913c99cff7595527b18d8b49d0a. Fix T74283: modifier display lost when moving object in edit mode. The cause is not immediately obvious so better to revert and look at this carefully. --- source/blender/blenkernel/intern/displist.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'source/blender/blenkernel/intern/displist.c') diff --git a/source/blender/blenkernel/intern/displist.c b/source/blender/blenkernel/intern/displist.c index 6963f629798..6d7d42b2293 100644 --- a/source/blender/blenkernel/intern/displist.c +++ b/source/blender/blenkernel/intern/displist.c @@ -1772,7 +1772,7 @@ static void do_makeDispListCurveTypes(Depsgraph *depsgraph, curve_calc_modifiers_post(depsgraph, scene, ob, &nubase, dispbase, r_final, for_render); } - if (cu->flag & CU_DEFORM_FILL && !ob->runtime.data_eval) { + if (cu->flag & CU_DEFORM_FILL && !ob->runtime.mesh_eval) { curve_to_filledpoly(cu, &nubase, dispbase); } @@ -1800,11 +1800,12 @@ void BKE_displist_make_curveTypes( dispbase = &(ob->runtime.curve_cache->disp); - Mesh *mesh_eval = NULL; - do_makeDispListCurveTypes(depsgraph, scene, ob, dispbase, for_render, for_orco, &mesh_eval); + do_makeDispListCurveTypes( + depsgraph, scene, ob, dispbase, for_render, for_orco, &ob->runtime.mesh_eval); - if (mesh_eval != NULL) { - BKE_object_eval_assign_data(ob, &mesh_eval->id, true); + if (ob->runtime.mesh_eval != NULL) { + ob->runtime.mesh_eval->id.tag |= LIB_TAG_COPIED_ON_WRITE_EVAL_RESULT; + ob->runtime.is_mesh_eval_owned = true; } boundbox_displist_object(ob); @@ -1860,9 +1861,8 @@ static void boundbox_displist_object(Object *ob) ob->runtime.bb = MEM_callocN(sizeof(BoundBox), "boundbox"); } - Mesh *mesh_eval = BKE_object_get_evaluated_mesh(ob); - if (mesh_eval) { - BKE_object_boundbox_calc_from_mesh(ob, mesh_eval); + if (ob->runtime.mesh_eval) { + BKE_object_boundbox_calc_from_mesh(ob, ob->runtime.mesh_eval); } else { float min[3], max[3]; -- cgit v1.2.3