Fix T57554: texture bake object to active error after recent changes.

This commit is contained in:
Brecht Van Lommel 2018-11-19 19:18:26 +01:00
parent eff8903026
commit 99d9d3dbce
Notes: blender-bot 2023-02-21 17:59:30 +01:00
Referenced by issue #57554, Texture bake running out of memory.
1 changed files with 2 additions and 2 deletions

View File

@ -514,9 +514,9 @@ bool RE_bake_pixels_populate_from_objects(
tris_high[i] = mesh_calc_tri_tessface(highpoly[i].me, false, NULL);
me_highpoly[i] = highpoly[i].me;
BKE_mesh_runtime_looptri_ensure(me_highpoly[i]);
BKE_mesh_tessface_ensure(me_highpoly[i]);
if (me_highpoly[i]->runtime.looptris.len != 0) {
if (me_highpoly[i]->totface != 0) {
/* Create a bvh-tree for each highpoly object */
BKE_bvhtree_from_mesh_get(&treeData[i], me_highpoly[i], BVHTREE_FROM_FACES, 2);