[Bf-blender-cvs] [ca6425824f8] greasepencil-object: GPencil: reorganize menus for new Vertex operators

Antonio Vazquez noreply at git.blender.org
Sat Nov 16 16:52:00 CET 2019


Commit: ca6425824f8814affee573d5969607bffd0d70de
Author: Antonio Vazquez
Date:   Sat Nov 16 16:51:50 2019 +0100
Branches: greasepencil-object
https://developer.blender.org/rBca6425824f8814affee573d5969607bffd0d70de

GPencil: reorganize menus for new Vertex operators

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

M	release/scripts/startup/bl_ui/properties_grease_pencil_common.py
M	release/scripts/startup/bl_ui/space_view3d.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 147ec27f6de..928aa075475 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -646,10 +646,6 @@ class GPENCIL_MT_cleanup(Menu):
         layout.operator("gpencil.frame_clean_fill", text="Boundary Strokes").mode = 'ACTIVE'
         layout.operator("gpencil.frame_clean_fill", text="Boundary Strokes all Frames").mode = 'ALL'
 
-        layout.separator()
-
-        layout.operator("gpencil.stroke_merge_material", text="Merge Materials")
-
         if ob.mode != 'PAINT_GPENCIL':
             layout.separator()
 
diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py
index 528bb881a6a..abbc9bb3710 100644
--- a/release/scripts/startup/bl_ui/space_view3d.py
+++ b/release/scripts/startup/bl_ui/space_view3d.py
@@ -4587,6 +4587,19 @@ class VIEW3D_MT_assign_material(Menu):
                                 icon='LAYER_ACTIVE' if mat == mat_active else 'BLANK1').material = mat.name
 
 
+class VIEW3D_MT_gpencil_materials(Menu):
+    bl_label = "Materials"
+
+    def draw(self, context):
+        layout = self.layout
+        layout.operator("gpencil.stroke_merge_material", text="Merge Similar")
+
+        layout.separator()
+
+        layout.operator("gpencil.material_to_vertex_color", text="Convert Materials to Vertex Color")
+        layout.operator("gpencil.extract_palette", text="Extract Palette from Vertex Color")
+
+
 class VIEW3D_MT_gpencil_copy_layer(Menu):
     bl_label = "Copy Layer to Object"
 
@@ -4667,9 +4680,14 @@ class VIEW3D_MT_edit_gpencil_stroke(Menu):
         layout.separator()
 
         layout.menu("GPENCIL_MT_move_to_layer")
+        layout.operator_menu_enum("gpencil.stroke_arrange", "direction", text="Arrange Strokes")
+
+        layout.separator()
+
         layout.menu("VIEW3D_MT_assign_material")
         layout.operator("gpencil.set_active_material", text="Set as Active Material")
-        layout.operator_menu_enum("gpencil.stroke_arrange", "direction", text="Arrange Strokes")
+
+        layout.menu("VIEW3D_MT_gpencil_materials")
 
         layout.separator()
 
@@ -7017,6 +7035,7 @@ classes = (
     VIEW3D_MT_edit_mesh_showhide,
     VIEW3D_MT_paint_gpencil,
     VIEW3D_MT_assign_material,
+    VIEW3D_MT_gpencil_materials,
     VIEW3D_MT_edit_gpencil,
     VIEW3D_MT_edit_gpencil_stroke,
     VIEW3D_MT_edit_gpencil_point,



More information about the Bf-blender-cvs mailing list