Fix T46226: Bake normals multi-res crash

This commit is contained in:
Campbell Barton
2015-09-24 20:14:51 +10:00
parent 4269c56904
commit 81f64312d2

View File

@@ -612,7 +612,7 @@ static void get_ccgdm_data(DerivedMesh *lodm, DerivedMesh *hidm,
int col = cell_index % polys_per_grid_side;
/* S is the vertex whose grid we are examining */
S = loc_cage_poly_offs / (polys_per_grid_side * polys_per_grid_side);
S = poly_index / (1 << (2 * (lvl - 1))) - grid_offset[cage_face_index];
/* get offset of grid data for original cage face */
g_index = grid_offset[cage_face_index];