[Bf-blender-cvs] [ad800451288] greasepencil-object: GPencil: Show Vertex Paint parameter in Overlay in Object mode
Antonio Vazquez
noreply at git.blender.org
Sat Nov 30 16:21:31 CET 2019
Commit: ad8004512882f8c71c989370ce2ca278212450fb
Author: Antonio Vazquez
Date: Sat Nov 30 16:21:20 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBad8004512882f8c71c989370ce2ca278212450fb
GPencil: Show Vertex Paint parameter in Overlay in Object mode
Also hide depending of shading modes.
===================================================================
M release/scripts/startup/bl_ui/space_view3d.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 216c598849c..c1b11bb02fa 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -6434,6 +6434,8 @@ class VIEW3D_PT_overlay_gpencil_options(Panel):
layout = self.layout
view = context.space_data
overlay = view.overlay
+ view = context.space_data
+ shading = view.shading
layout.prop(overlay, "use_gpencil_onion_skin", text="Onion Skin")
@@ -6464,9 +6466,17 @@ class VIEW3D_PT_overlay_gpencil_options(Panel):
if context.object.mode in {'EDIT_GPENCIL', 'SCULPT_GPENCIL', 'WEIGHT_GPENCIL', 'VERTEX_GPENCIL'}:
layout.prop(overlay, "vertex_opacity", text="Vertex Opacity", slider=True)
- if context.object.mode in {'PAINT_GPENCIL', 'EDIT_GPENCIL', 'SCULPT_GPENCIL', 'VERTEX_GPENCIL'}:
- layout.label(text="Vertex Paint")
- layout.prop(overlay, "gpencil_vertex_paint_opacity", text="Opacity", slider=True)
+ if context.object.mode in {'OBJECT', 'PAINT_GPENCIL', 'EDIT_GPENCIL', 'SCULPT_GPENCIL', 'VERTEX_GPENCIL'}:
+ show_vertex = True
+
+ if shading.type == 'WIREFRAME':
+ show_vertex = False
+ elif shading.type == 'SOLID' and shading.color_type in {'MATERIAL', 'OBJECT', 'SINGLE', 'RANDOM'}:
+ show_vertex = False
+
+ if show_vertex is True:
+ layout.label(text="Vertex Paint")
+ layout.prop(overlay, "gpencil_vertex_paint_opacity", text="Opacity", slider=True)
class VIEW3D_PT_quad_view(Panel):
More information about the Bf-blender-cvs
mailing list