Overlay: Enabled wireframe drawing for vertex/weight paint
authorJeroen Bakker <j.bakker@atmind.nl>
Tue, 1 May 2018 14:26:31 +0000 (16:26 +0200)
committerJeroen Bakker <j.bakker@atmind.nl>
Tue, 1 May 2018 14:26:31 +0000 (16:26 +0200)
This is a temp hack, so that billrey can use blender 2.8 for
drawing the icons. Hack will be phased out by T54910

release/scripts/startup/bl_ui/space_view3d.py
source/blender/draw/modes/shaders/paint_wire_vert.glsl

index 8ab4bbed91fc709f2984987389e20cf2d6823f11..23ae4118a5777645a93407fa1a427257ff973778 100644 (file)
@@ -3592,6 +3592,14 @@ class VIEW3D_PT_overlay(Panel):
 
         col.prop(view, "show_world")
 
+        if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX'}:
+            engine_type = {
+                'PAINT_WEIGHT': 'WeightPaintMode',
+                'PAINT_VERTEX': 'VertexPaintMode',
+            }.get(context.mode)
+            engine_props = scene.collection_properties[engine_type]
+            col.prop(engine_props, "use_wire")
+
         if context.mode in {'PAINT_WEIGHT', 'PAINT_VERTEX', 'PAINT_TEXTURE'}:
             col.prop(view, "show_mode_shade_override")
 
index 253c21745e22bed8970e4a9fd0869946210f5966..e0c3384511f3501a85276fa8e9cdc35e30e21423 100644 (file)
@@ -10,5 +10,8 @@ void main()
 {
        gl_Position = ModelViewProjectionMatrix * vec4(pos, 1.0);
 
+       /* Temp hack for william to start using blender 2.8 for icons. Will be removed by T54910 */
+       gl_Position.z -= 0.001;
+
        finalFlag = data;
 }