Merged 38822-39182
[blender.git] / source / blender / blenkernel / intern / DerivedMesh.c
index ba67e58..dd2f3e2 100644 (file)
@@ -1962,7 +1962,9 @@ static void mesh_calc_modifiers(Scene *scene, Object *ob, float (*inputVertexCos
                        
                        /* set the DerivedMesh to only copy needed data */
                        mask= (CustomDataMask)GET_INT_FROM_POINTER(curr->link);
-                       DM_set_only_copy(dm, mask);
+                       /* needMapping check here fixes bug [#28112], otherwise its
+                        * possible that it wont be copied */
+                       DM_set_only_copy(dm, mask | (needMapping ? CD_MASK_ORIGINDEX : 0));
                        
                        /* add cloth rest shape key if need */
                        if(mask & CD_MASK_CLOTH_ORCO)