diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-22 12:58:48 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-07-22 13:01:38 +0300 |
commit | 461340525eea970a9d85d3958cc58bfda07abe7b (patch) | |
tree | 8c2f478be4c15bdcc2822f8306c064a7c5669b30 /source/blender/blenkernel/intern/DerivedMesh.c | |
parent | 945f32e66d6ada2a05b7700a197209b9c66b4682 (diff) |
OpenSubdiv: Resolve crash when trying to do weight mcol
Diffstat (limited to 'source/blender/blenkernel/intern/DerivedMesh.c')
-rw-r--r-- | source/blender/blenkernel/intern/DerivedMesh.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/DerivedMesh.c b/source/blender/blenkernel/intern/DerivedMesh.c index 05ec83e70a9..3f4b1eec512 100644 --- a/source/blender/blenkernel/intern/DerivedMesh.c +++ b/source/blender/blenkernel/intern/DerivedMesh.c @@ -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 |