OpenSubdiv: Resolve crash when trying to do weight mcol

This commit is contained in:
Sergey Sharybin 2015-07-22 11:58:48 +02:00
parent 945f32e66d
commit 461340525e
1 changed files with 6 additions and 2 deletions

View File

@ -2186,8 +2186,12 @@ static void editbmesh_calc_modifiers(
#if 0 /* XXX Will re-enable this when we have global mod stack options. */
const bool do_final_wmcol = (scene->toolsettings->weights_preview == WP_WPREVIEW_FINAL) && do_wmcol;
#endif
#ifndef WITH_OPENSUBDIV
const bool do_final_wmcol = false;
const bool do_init_wmcol = ((((Mesh *)ob->data)->drawflag & ME_DRAWEIGHT) && !do_final_wmcol);
#else
const bool do_init_wmcol = false;
#endif
const bool do_init_statvis = ((((Mesh *)ob->data)->drawflag & ME_DRAW_STATVIS) && !do_init_wmcol);
const bool do_mod_wmcol = do_init_wmcol;
VirtualModifierData virtualModifierData;
@ -2480,7 +2484,7 @@ static void mesh_build_data(
#ifdef WITH_OPENSUBDIV
if (calc_modifiers_skip_orco(ob)) {
dataMask &= ~CD_MASK_ORCO;
dataMask &= ~(CD_MASK_ORCO | CD_MASK_PREVIEW_MCOL);
}
#endif
@ -2515,7 +2519,7 @@ static void editbmesh_build_data(Scene *scene, Object *obedit, BMEditMesh *em, C
#ifdef WITH_OPENSUBDIV
if (calc_modifiers_skip_orco(obedit)) {
dataMask &= ~CD_MASK_ORCO;
dataMask &= ~(CD_MASK_ORCO | CD_MASK_PREVIEW_MCOL);
}
#endif