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

This commit is contained in:
2018-11-19 19:18:26 +01:00
parent eff8903026
commit 99d9d3dbce

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);