Fix possible invalid normal use w/ tangent calc

Was using MFace normals, not MPoly
This commit is contained in:
Campbell Barton 2017-05-24 21:13:32 +10:00
parent 6715bfee92
commit d252ac6b95
Notes: blender-bot 2023-02-14 03:03:03 +01:00
Referenced by issue #91171, Blender crashes if simplify is turned on while baking multires
1 changed files with 1 additions and 1 deletions

View File

@ -3456,7 +3456,7 @@ void DM_calc_loop_tangents(
* have to check this is valid...
*/
mesh2tangent->precomputedLoopNormals = dm->getLoopDataArray(dm, CD_NORMAL);
mesh2tangent->precomputedFaceNormals = CustomData_get_layer(&dm->faceData, CD_NORMAL);
mesh2tangent->precomputedFaceNormals = CustomData_get_layer(&dm->polyData, CD_NORMAL);
mesh2tangent->orco = NULL;
mesh2tangent->mloopuv = CustomData_get_layer_named(&dm->loopData, CD_MLOOPUV, dm->loopData.layers[index].name);