[Bf-blender-cvs] [b6a898b] master: GPencil UI: Streamline toolbar options a bit
Joshua Leung
noreply at git.blender.org
Thu Jun 23 17:19:54 CEST 2016
Commit: b6a898b3dba5b762863baa40868e58a46279682e
Author: Joshua Leung
Date: Sat Jun 18 16:52:21 2016 +1200
Branches: master
https://developer.blender.org/rBb6a898b3dba5b762863baa40868e58a46279682e
GPencil UI: Streamline toolbar options a bit
As suggested by mendiobox:
* Don't show "enable editing" in the 3D view. You can already do this by switching
into stroke editing mode here, so no need for the duplication. (In other editors
though, this can't be done yet, so we don't do it)
* Make the "Convert" button into a dropdown so that you don't need to deal with a
a separate popup menu
* In the 3D view, don't show the selection + transform operators that can be easily
found in the menus too (as well as having commonly used shortcuts)
===================================================================
M release/scripts/startup/bl_ui/properties_grease_pencil_common.py
===================================================================
diff --git a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
index a823789..ac41268 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -63,6 +63,9 @@ class GreasePencilDrawingToolsPanel:
def draw(self, context):
layout = self.layout
+ is_3d_view = context.space_data.type == 'VIEW_3D'
+ is_clip_editor = context.space_data.type == 'CLIP_EDITOR'
+
col = layout.column(align=True)
col.label(text="Draw:")
@@ -85,9 +88,9 @@ class GreasePencilDrawingToolsPanel:
col.separator()
col.label("Data Source:")
row = col.row(align=True)
- if context.space_data.type == 'VIEW_3D':
+ if is_3d_view:
row.prop(context.tool_settings, "grease_pencil_source", expand=True)
- elif context.space_data.type == 'CLIP_EDITOR':
+ elif is_clip_editor:
row.prop(context.space_data, "grease_pencil_source", expand=True)
col.separator()
@@ -97,19 +100,19 @@ class GreasePencilDrawingToolsPanel:
gpd = context.gpencil_data
- if gpd:
+ if gpd and not is_3d_view:
layout.separator()
layout.separator()
col = layout.column(align=True)
col.prop(gpd, "use_stroke_edit_mode", text="Enable Editing", icon='EDIT', toggle=True)
- if context.space_data.type == 'VIEW_3D':
+ if is_3d_view:
col.separator()
col.separator()
col.label(text="Tools:")
- col.operator("gpencil.convert", text="Convert...")
+ col.operator_menu_enum("gpencil.convert", text="Convert to Geometry...", property="type")
col.operator("view3d.ruler")
@@ -133,20 +136,23 @@ class GreasePencilStrokeEditPanel:
def draw(self, context):
layout = self.layout
- layout.label(text="Select:")
- col = layout.column(align=True)
- col.operator("gpencil.select_all", text="Select All")
- col.operator("gpencil.select_border")
- col.operator("gpencil.select_circle")
+ is_3d_view = context.space_data.type == 'VIEW_3D'
- layout.separator()
+ if not is_3d_view:
+ layout.label(text="Select:")
+ col = layout.column(align=True)
+ col.operator("gpencil.select_all", text="Select All")
+ col.operator("gpencil.select_border")
+ col.operator("gpencil.select_circle")
- col = layout.column(align=True)
- col.operator("gpencil.select_linked")
- col.operator("gpencil.select_more")
- col.operator("gpencil.select_less")
+ layout.separator()
- layout.separator()
+ col = layout.column(align=True)
+ col.operator("gpencil.select_linked")
+ col.operator("gpencil.select_more")
+ col.operator("gpencil.select_less")
+
+ layout.separator()
layout.label(text="Edit:")
row = layout.row(align=True)
@@ -160,12 +166,13 @@ class GreasePencilStrokeEditPanel:
layout.separator()
- col = layout.column(align=True)
- col.operator("transform.translate") # icon='MAN_TRANS'
- col.operator("transform.rotate") # icon='MAN_ROT'
- col.operator("transform.resize", text="Scale") # icon='MAN_SCALE'
+ if not is_3d_view:
+ col = layout.column(align=True)
+ col.operator("transform.translate") # icon='MAN_TRANS'
+ col.operator("transform.rotate") # icon='MAN_ROT'
+ col.operator("transform.resize", text="Scale") # icon='MAN_SCALE'
- layout.separator()
+ layout.separator()
col = layout.column(align=True)
col.operator("transform.bend", text="Bend")
More information about the Bf-blender-cvs
mailing list