Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRay Molenkamp <github@lazydodo.com>2020-01-30 01:02:02 +0300
committerRay Molenkamp <github@lazydodo.com>2020-01-30 01:02:02 +0300
commit89996da1f5b28b586bfbd7c54b568c5034a5fe91 (patch)
tree029ca7493a99abbecf406718e433ac529d7694f4 /source/blender/draw/intern/draw_cache.c
parentc3001812dc0253624c03236e75da229418a8c4ad (diff)
parentc7c8ee61686f22a11995f6fe6b10acf59db12b00 (diff)
Merge remote-tracking branch 'origin/blender-v2.82-release'
Diffstat (limited to 'source/blender/draw/intern/draw_cache.c')
-rw-r--r--source/blender/draw/intern/draw_cache.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/source/blender/draw/intern/draw_cache.c b/source/blender/draw/intern/draw_cache.c
index f2764753a51..6bb58bf8795 100644
--- a/source/blender/draw/intern/draw_cache.c
+++ b/source/blender/draw/intern/draw_cache.c
@@ -826,11 +826,12 @@ GPUBatch *DRW_cache_object_surface_get(Object *ob)
int DRW_cache_object_material_count_get(struct Object *ob)
{
+ Mesh *me = (ob->runtime.mesh_eval != NULL) ? ob->runtime.mesh_eval : (Mesh *)ob->data;
short type = (ob->runtime.mesh_eval != NULL) ? OB_MESH : ob->type;
switch (type) {
case OB_MESH:
- return DRW_mesh_material_count_get(ob->data);
+ return DRW_mesh_material_count_get(me);
case OB_CURVE:
case OB_SURF:
case OB_FONT: