From d4c078b887adef4697c74e9c340525189f2fb2d6 Mon Sep 17 00:00:00 2001 From: Antony Riakiotakis Date: Sun, 1 Jun 2014 20:44:12 +0300 Subject: Fix T40342 smooth shading flag in dyntopo does not work under MSVC. Classic case of integer flag AND-ing result passed to boolean and failing. --- source/blender/makesrna/intern/rna_sculpt_paint.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/makesrna/intern/rna_sculpt_paint.c') diff --git a/source/blender/makesrna/intern/rna_sculpt_paint.c b/source/blender/makesrna/intern/rna_sculpt_paint.c index 54af55260e5..a3a06893522 100644 --- a/source/blender/makesrna/intern/rna_sculpt_paint.c +++ b/source/blender/makesrna/intern/rna_sculpt_paint.c @@ -226,8 +226,8 @@ static void rna_Sculpt_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNU WM_main_add_notifier(NC_OBJECT | ND_MODIFIER, ob); if (ob->sculpt) { - ob->sculpt->bm_smooth_shading = (scene->toolsettings->sculpt->flags & - SCULPT_DYNTOPO_SMOOTH_SHADING); + ob->sculpt->bm_smooth_shading = ((scene->toolsettings->sculpt->flags & + SCULPT_DYNTOPO_SMOOTH_SHADING) != 0); } } } @@ -238,7 +238,7 @@ static void rna_Sculpt_ShowDiffuseColor_update(Main *UNUSED(bmain), Scene *scene if (ob && ob->sculpt) { Sculpt *sd = scene->toolsettings->sculpt; - ob->sculpt->show_diffuse_color = sd->flags & SCULPT_SHOW_DIFFUSE; + ob->sculpt->show_diffuse_color = ((sd->flags & SCULPT_SHOW_DIFFUSE) != 0); if (ob->sculpt->pbvh) pbvh_show_diffuse_color_set(ob->sculpt->pbvh, ob->sculpt->show_diffuse_color); -- cgit v1.2.3