Commit: a10266310bacafc924443a4f8f977a5dc295ce0c
Author: Antonio Vazquez
Date:   Fri Jun 22 18:14:20 2018 +0200
Branches: greasepencil-object
https://developer.blender.org/rBa10266310bacafc924443a4f8f977a5dc295ce0c

UI: Changes in Specials and Deleet menus

===================================================================

M       release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M       release/scripts/startup/bl_ui/space_view3d.py
M       source/blender/editors/gpencil/gpencil_ops.c

===================================================================

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 456ed6c9f41..e5985af1c64 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -640,11 +640,6 @@ class GPENCIL_MT_gpencil_edit_specials(Menu):
         layout.operator("gpencil.stroke_join", text="Join & Copy").type = 
'JOINCOPY'
         layout.operator("gpencil.stroke_flip", text="Flip Direction")
 
-        layout.separator()
-
-        layout.operator("gpencil.frame_clean_fill", text="Clean Boundary 
Strokes").mode = 'ACTIVE'
-        layout.operator("gpencil.frame_clean_fill", text="Clean Boundary 
Strokes all Frames").mode = 'ALL'
-
         layout.separator()
         layout.operator("gpencil.frame_duplicate", text="Duplicate Active 
Frame")
         layout.operator("gpencil.frame_duplicate", text="Duplicate Active 
Frame All Layers").mode = 'ALL'
@@ -672,11 +667,6 @@ class GPENCIL_MT_gpencil_sculpt_specials(Menu):
         layout.operator("gpencil.stroke_simplify_fixed", text="Simplify")
         layout.operator("gpencil.stroke_simplify", text="Simplify Adaptative")
 
-        layout.separator()
-
-        layout.operator("gpencil.frame_clean_fill", text="Clean Boundary 
Strokes").mode = 'ACTIVE'
-        layout.operator("gpencil.frame_clean_fill", text="Clean Boundary 
Strokes all Frames").mode = 'ALL'
-
 
 class GPENCIL_MT_gpencil_draw_specials(Menu):
     bl_label = "GPencil Draw Specials"
@@ -689,12 +679,6 @@ class GPENCIL_MT_gpencil_draw_specials(Menu):
 
         layout.operator("gpencil.frame_duplicate", text="Duplicate Active 
Frame")
         layout.operator("gpencil.frame_duplicate", text="Duplicate Active 
Frame All Layers").mode = 'ALL'
-        layout.separator()
-        layout.operator("gpencil.active_frames_delete_all", text="Delete 
Frame")
-
-        layout.separator()
-        layout.operator("gpencil.frame_clean_fill", text="Clean Boundary 
Strokes").mode = 'ACTIVE'
-        layout.operator("gpencil.frame_clean_fill", text="Clean Boundary 
Strokes all Frames").mode = 'ALL'
 
         layout.separator()
         layout.operator("gpencil.primitive", text="Line", 
icon='IPO_CONSTANT').type = 'LINE'
@@ -706,6 +690,18 @@ class GPENCIL_MT_gpencil_draw_specials(Menu):
         layout.operator("gpencil.colorpick", text="Colors", icon="GROUP_VCOL")
 
 
+class GPENCIL_MT_gpencil_draw_delete(Menu):
+    bl_label = "GPencil Draw Delete"
+
+    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.active_frames_delete_all", text="Delete 
Frame")
+
+
 class GPENCIL_UL_layer(UIList):
     def draw_item(self, context, layout, data, item, icon, active_data, 
active_propname, index):
         # assert(isinstance(item, bpy.types.GPencilLayer)
@@ -943,6 +939,7 @@ classes = (
     GPENCIL_MT_gpencil_edit_specials,
     GPENCIL_MT_gpencil_sculpt_specials,
     GPENCIL_MT_gpencil_draw_specials,
+    GPENCIL_MT_gpencil_draw_delete,
     GPENCIL_UL_layer,
     GPENCIL_MT_layer_specials,
 )
diff --git a/release/scripts/startup/bl_ui/space_view3d.py 
b/release/scripts/startup/bl_ui/space_view3d.py
index e49b6fa9c42..ccc3214b9ee 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -3111,6 +3111,11 @@ class VIEW3D_MT_edit_gpencil_delete(Menu):
 
         layout.operator("gpencil.active_frames_delete_all")
 
+        layout.separator()
+
+        layout.operator("gpencil.frame_clean_fill", text="Clean Boundary 
Strokes").mode = 'ACTIVE'
+        layout.operator("gpencil.frame_clean_fill", text="Clean Boundary 
Strokes all Frames").mode = 'ALL'
+
 
 # Edit Curve
 # draw_curve is used by VIEW3D_MT_edit_curve and VIEW3D_MT_edit_surface
diff --git a/source/blender/editors/gpencil/gpencil_ops.c 
b/source/blender/editors/gpencil/gpencil_ops.c
index 55c1c4dcf2a..cc2aa18af1f 100644
--- a/source/blender/editors/gpencil/gpencil_ops.c
+++ b/source/blender/editors/gpencil/gpencil_ops.c
@@ -562,9 +562,11 @@ static void ed_keymap_gpencil_painting(wmKeyConfig 
*keyconf)
        kmi = WM_keymap_add_item(keymap, "WM_OT_radial_control", FKEY, 
KM_PRESS, KM_CTRL, 0);
        RNA_string_set(kmi->ptr, "data_path_primary", 
"user_preferences.edit.grease_pencil_eraser_radius");
 
-       /* menu draw specials (add two keys to make more easy for user) */
+       /* menu draw specials */
        WM_keymap_add_menu(keymap, "GPENCIL_MT_gpencil_draw_specials", WKEY, 
KM_PRESS, 0, 0);
-       WM_keymap_add_menu(keymap, "GPENCIL_MT_gpencil_draw_specials", XKEY, 
KM_PRESS, 0, 0);
+
+       /* menu draw delete */
+       WM_keymap_add_menu(keymap, "GPENCIL_MT_gpencil_draw_delete", XKEY, 
KM_PRESS, 0, 0);
 
        /* color picker */
        WM_keymap_add_item(keymap, "GPENCIL_OT_colorpick", PKEY, KM_PRESS, 0, 
0);

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to