Sculpting: Fix for "Hide Mask" does not work with multires
authorSergey Sharybin <sergey.vfx@gmail.com>
Tue, 16 Jan 2018 13:31:52 +0000 (14:31 +0100)
committerSergey Sharybin <sergey.vfx@gmail.com>
Tue, 16 Jan 2018 13:31:52 +0000 (14:31 +0100)
source/blender/gpu/intern/gpu_buffers.c

index afe7a4c4d2784046cfbadcbd425b1990166c0dcb..8c6bc982bf2d5c8c1a1e96369e2163d12d35c9b3 100644 (file)
@@ -1321,13 +1321,18 @@ void GPU_pbvh_grid_buffers_update(
                                                        normal_float_to_short_v3(vd->no, fno);
 
                                                        if (has_mask) {
-                                                               gpu_color_from_mask_quad_copy(key,
-                                                                                             elems[0],
-                                                                                             elems[1],
-                                                                                             elems[2],
-                                                                                             elems[3],
-                                                                                             diffuse_color,
-                                                                                             vd->color);
+                                                               if (show_mask) {
+                                                                       gpu_color_from_mask_quad_copy(key,
+                                                                                                     elems[0],
+                                                                                                     elems[1],
+                                                                                                     elems[2],
+                                                                                                     elems[3],
+                                                                                                     diffuse_color,
+                                                                                                     vd->color);
+                                                               }
+                                                               else {
+                                                                       F3TOCHAR3(diffuse_color, vd->color);
+                                                               }
                                                        }
                                                }
                                        }