diff options
author | Antonioya <blendergit@gmail.com> | 2016-09-16 12:48:41 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2016-09-16 12:49:29 +0300 |
commit | b2f1b8ab7a59907a81620a98ec5edb0d4d35ec59 (patch) | |
tree | 14428ac23abfb081e3212574196a3b0f5b1a8a03 /release/scripts/startup | |
parent | 4b046c530d3e14d7737c4770b9ae07942f4c6047 (diff) |
GPencil: Add a new special menu for editing and replace subdivision shortcut
Replace the W shortcut for subdivision by a new menu for edit specials
in order to keep consistency in UI.
Subdivision is not used all the time, so it's better assign this
shortcut to menu.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 26 |
1 files changed, 26 insertions, 0 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 9432be39d1d..50541255ef1 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -651,6 +651,32 @@ class GPENCIL_MT_snap(Menu): layout.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid") +class GPENCIL_MT_gpencil_edit_specials(Menu): + bl_label = "GPencil Specials" + + def draw(self, context): + layout = self.layout + is_3d_view = context.space_data.type == 'VIEW_3D' + + layout.operator_context = 'INVOKE_REGION_WIN' + + layout.operator("gpencil.stroke_subdivide", text="Subdivide") + + layout.separator() + + layout.operator("gpencil.stroke_join", text="Join").type = 'JOIN' + layout.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY' + layout.operator("gpencil.stroke_flip", text="Flip Direction") + + gpd = context.gpencil_data + if gpd: + layout.prop(gpd, "show_stroke_direction", text="Show Directions") + + if is_3d_view: + layout.separator() + layout.operator("gpencil.reproject") + + ############################### |