From de886884c07f1fcb5ad9473035cc2e471d3b13c8 Mon Sep 17 00:00:00 2001 From: YimingWu Date: Sat, 19 Feb 2022 22:35:22 +0800 Subject: Fix T95470: LineArt GPU subdiv fix. Use evaluated mesh instead of ob->data. Reviewed by: Antonio Vazquez (antoniov) Differential Revision: https://developer.blender.org/D14040 --- source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/gpencil_modifiers') diff --git a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c index a9ec136831d..19548f6ffa3 100644 --- a/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c +++ b/source/blender/gpencil_modifiers/intern/lineart/lineart_cpu.c @@ -2221,7 +2221,7 @@ static void lineart_main_load_geometries( } if (use_ob->type == OB_MESH) { - use_mesh = use_ob->data; + use_mesh = BKE_object_get_evaluated_mesh(use_ob); } else { /* If DEG_ITER_OBJECT_FLAG_DUPLI is set, some curve objects may also have an evaluated mesh @@ -4469,7 +4469,7 @@ static void lineart_gpencil_generate(LineartCache *cache, if ((match_output || (gpdg = BKE_object_defgroup_name_index(gpencil_object, vgname)) >= 0)) { if (eval_ob && eval_ob->type == OB_MESH) { int dindex = 0; - Mesh *me = (Mesh *)eval_ob->data; + Mesh *me = BKE_object_get_evaluated_mesh(eval_ob); if (me->dvert) { LISTBASE_FOREACH (bDeformGroup *, db, &me->vertex_group_names) { if ((!source_vgname) || strstr(db->name, source_vgname) == db->name) { -- cgit v1.2.3