From 318112379d6d251334b8f3d2a20b935210446b4f Mon Sep 17 00:00:00 2001 From: Brecht Van Lommel Date: Thu, 27 Feb 2020 11:23:15 +0100 Subject: Objects: make evaluated data runtime storage usable for types other than mesh This is in preparation of new object types. This only changes mesh_eval, we may do the same for mesh_deform_eval and other areas in the future if there is a need for it. This previously caused a bug in T74283, that should be fixed now. Differential Revision: https://developer.blender.org/D6695 --- source/blender/editors/space_info/info_stats.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source/blender/editors/space_info') diff --git a/source/blender/editors/space_info/info_stats.c b/source/blender/editors/space_info/info_stats.c index 225ca72a7d0..d00083d343b 100644 --- a/source/blender/editors/space_info/info_stats.c +++ b/source/blender/editors/space_info/info_stats.c @@ -137,7 +137,7 @@ static void stats_object(Object *ob, SceneStats *stats, GSet *objects_gset) switch (ob->type) { case OB_MESH: { /* we assume evaluated mesh is already built, this strictly does stats now. */ - Mesh *me_eval = ob->runtime.mesh_eval; + Mesh *me_eval = BKE_object_get_evaluated_mesh(ob); if (!BLI_gset_add(objects_gset, me_eval)) { break; } @@ -153,8 +153,7 @@ static void stats_object(Object *ob, SceneStats *stats, GSet *objects_gset) case OB_SURF: case OB_CURVE: case OB_FONT: { - Mesh *me_eval = ob->runtime.mesh_eval; - + Mesh *me_eval = BKE_object_get_evaluated_mesh(ob); if ((me_eval != NULL) && !BLI_gset_add(objects_gset, me_eval)) { break; } -- cgit v1.2.3