Fix another index error, made multimaterial mapped meshes draw
authorAntony Riakiotakis <kalast@gmail.com>
Fri, 17 Jul 2015 13:15:53 +0000 (15:15 +0200)
committerAntony Riakiotakis <kalast@gmail.com>
Fri, 17 Jul 2015 13:15:53 +0000 (15:15 +0200)
incorrectly.

source/blender/blenkernel/intern/cdderivedmesh.c

index 6880c1c9b2ae3e7346d38929b92807efa34da0e1..d5cdc50df657dd1e440c9c30742bc378eb572905 100644 (file)
@@ -739,7 +739,7 @@ static void cdDM_drawMappedFaces(
                                        if (i != totpoly - 1)
                                                next_actualFace = bufmat->polys[i + 1];
 
-                                       orig = (index_mp_to_orig) ? index_mp_to_orig[i] : i;
+                                       orig = (index_mp_to_orig) ? index_mp_to_orig[actualFace] : actualFace;
 
                                        if (setDrawOptions != NULL && (orig != ORIGINDEX_NONE))
                                                draw_option = setDrawOptions(userData, orig);