Commit: d4c078b887adef4697c74e9c340525189f2fb2d6
Author: Antony Riakiotakis
Date:   Sun Jun 1 20:44:12 2014 +0300
https://developer.blender.org/rBd4c078b887adef4697c74e9c340525189f2fb2d6

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.

===================================================================

M       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 54af552..a3a0689 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);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to