[Bf-blender-cvs] [3ec422182f6] greasepencil-object: GP "Strokes Edit" Panel: Consolidate a few items in preparation for restoration of 2D GPencil (WIP)

Joshua Leung noreply at git.blender.org
Wed Feb 7 03:14:15 CET 2018


Commit: 3ec422182f60254f312aec1c391ef33c1b12c110
Author: Joshua Leung
Date:   Wed Feb 7 14:17:47 2018 +1300
Branches: greasepencil-object
https://developer.blender.org/rB3ec422182f60254f312aec1c391ef33c1b12c110

GP "Strokes Edit" Panel: Consolidate a few items in preparation for restoration of 2D GPencil (WIP)

The groupings here are not final, and can still be adjusted/scrapped.

1) Used "operator_menu_enum"'s in place of listing out all the modes of
   certain operators with multiple modes. This brings those operators more
   in line with the other ops here (and in other parts).

2) Fixed the code to not show 3D only operators if this panel gets used
   anywhere else.

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

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 5f5158b851c..752fb353b8b 100644
--- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
+++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py
@@ -221,36 +221,32 @@ class GreasePencilStrokeEditPanel:
         col.operator_menu_enum("gpencil.stroke_arrange", text="Arrange Strokes...", property="direction")
         col.operator("gpencil.stroke_change_color", text="Move to Color")
 
-        if is_3d_view:
-            layout.separator()
-
-
         layout.separator()
         col = layout.column(align=True)
         col.operator("gpencil.stroke_subdivide", text="Subdivide")
-        col.operator("gpencil.stroke_simplify_fixed", text="Simplify")
-        col.operator("gpencil.stroke_simplify", text="Simplify Adaptative")
-        col.operator("gpencil.stroke_join", text="Join").type = 'JOIN'
-        col.operator("gpencil.stroke_join", text="Join & Copy").type = 'JOINCOPY'
+        row = col.row(align=True)
+        row.operator("gpencil.stroke_simplify_fixed", text="Simplify")
+        row.operator("gpencil.stroke_simplify", text="Adaptative")
 
         col.separator()
-        col.operator("gpencil.stroke_separate", text="Separate Point").mode = 'POINT'
-        col.operator("gpencil.stroke_separate", text="Separate Stroke").mode = 'STROKE'
-        col.operator("gpencil.stroke_separate", text="Separate Layer").mode = 'LAYER'
 
-        col.separator()
-        col.operator("gpencil.stroke_split", text="Split")
+        row = col.row(align=True)
+        row.operator("gpencil.stroke_join", text="Join").type = 'JOIN'
+        row.operator("gpencil.stroke_join", text="& Copy").type = 'JOINCOPY'
 
-        col.separator()
         col.operator("gpencil.stroke_flip", text="Flip Direction")
 
-        col.separator()
-        col.operator("gpencil.frame_clean_fill", text="Clean Boundary Strokes").mode = 'ACTIVE'
-        col.operator("gpencil.frame_clean_fill", text="Clean Boundary Strokes all Frames").mode = 'ALL'
-
         if is_3d_view:
             layout.separator()
-            layout.operator_menu_enum("gpencil.reproject", text="Reproject Strokes...", property="type")
+            
+            col = layout.column(align=True)
+            col.operator_menu_enum("gpencil.stroke_separate", text="Separate...", property="mode")
+            col.operator("gpencil.stroke_split", text="Split")
+
+            col = layout.column(align=True)
+            col.label(text="Cleanup:")
+            col.operator_menu_enum("gpencil.reproject", text="Reproject Strokes...", property="type")
+            col.operator_menu_enum("gpencil.frame_clean_fill", text="Clean Boundary Strokes...", property="mode")
 
 
 class GreasePencilAnimationPanel:



More information about the Bf-blender-cvs mailing list