[Bf-blender-cvs] [a8b63c3675c] greasepencil-object: UI: Define a Header Text for Overlay Panel
Antonio Vazquez
noreply at git.blender.org
Sat Jul 7 17:37:39 CEST 2018
Commit: a8b63c3675c719cae69a33b570b20322fd803558
Author: Antonio Vazquez
Date: Sat Jul 7 17:37:29 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBa8b63c3675c719cae69a33b570b20322fd803558
UI: Define a Header Text for Overlay Panel
===================================================================
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 159ea0472cb..f1381469e33 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4304,13 +4304,22 @@ class VIEW3D_PT_overlay_gpencil_options(Panel):
bl_space_type = 'VIEW_3D'
bl_region_type = 'HEADER'
bl_parent_id = 'VIEW3D_PT_overlay'
- bl_options = {'HIDE_HEADER'}
bl_label = ""
@classmethod
def poll(cls, context):
return context.object and context.object.type == 'GPENCIL'
+ def draw_header(self, context):
+ layout = self.layout
+ layout.label(text={
+ 'GPENCIL_PAINT': "Draw Grease Pencil",
+ 'GPENCIL_EDIT': "Edit Grease Pencil",
+ 'GPENCIL_SCULPT': "Sculpt Grease Pencil",
+ 'GPENCIL_WEIGHT': "Weight Grease Pencil",
+ 'OBJECT': "Grease Pencil",
+ }[context.mode])
+
def draw(self, context):
layout = self.layout
view = context.space_data
More information about the Bf-blender-cvs
mailing list