LineArt: GPU subdiv fix.

Use evaluated mesh instead of ob->data.

Reviewed by: Antonio Vazquez (antoniov)

Differential Revision: https://developer.blender.org/D14040
This commit is contained in:
YimingWu 2022-02-19 22:35:22 +08:00
parent 385d9488e6
commit 991781c8ea
Notes: blender-bot 2023-02-21 17:59:30 +01:00
Referenced by issue #96124, Cloth Filter Doesn't respect collision outer surface thickness
Referenced by issue #95470, GP Lineart ignores subdivision modifier with GPU subdivisions on
1 changed files with 2 additions and 2 deletions

View File

@ -2205,7 +2205,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
@ -4453,7 +4453,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) {