diff options
author | Joshua Leung <aligorith@gmail.com> | 2016-06-18 07:52:21 +0300 |
---|---|---|
committer | Joshua Leung <aligorith@gmail.com> | 2016-06-23 18:18:33 +0300 |
commit | b6a898b3dba5b762863baa40868e58a46279682e (patch) | |
tree | 0da0323e75219e0df6d55edad745640e375a3a92 /release/scripts | |
parent | ec7603d6f115bfae53b7b0c887fd0b46a82a16d6 (diff) |
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)
Diffstat (limited to 'release/scripts')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 49 |
1 files changed, 28 insertions, 21 deletions
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 a823789f2c3..ac412688fa1 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") |