diff options
author | Antonioya <blendergit@gmail.com> | 2018-08-15 18:01:27 +0300 |
---|---|---|
committer | Antonioya <blendergit@gmail.com> | 2018-08-15 21:27:59 +0300 |
commit | d7fcb68d1139bb5239757b0834afa96b6d39d476 (patch) | |
tree | 59e1078b4a061a4f747c7101c4b3807411e0defb /release/scripts/startup | |
parent | 8e8d93eb86109988db44730a0107e9da9e870328 (diff) |
GP: New clean loose points operator
This operator clean any stroke below a defined number of points. This is used because sometimes when use eraser some points keep missing.
Also some changes in the UI menu.
Diffstat (limited to 'release/scripts/startup')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 20 | ||||
-rw-r--r-- | release/scripts/startup/bl_ui/space_view3d.py | 4 |
2 files changed, 18 insertions, 6 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 336e4acfd8f..7101b855c58 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -599,10 +599,6 @@ class GPENCIL_MT_gpencil_draw_specials(Menu): layout.operator("gpencil.primitive", text="Rectangle", icon='UV_FACESEL').type = 'BOX' layout.operator("gpencil.primitive", text="Circle", icon='ANTIALIASED').type = 'CIRCLE' - # Colors. - layout.separator() - layout.operator("gpencil.colorpick", text="Colors", icon="GROUP_VCOL") - class GPENCIL_MT_gpencil_draw_delete(Menu): bl_label = "GPencil Draw Delete" @@ -616,6 +612,21 @@ class GPENCIL_MT_gpencil_draw_delete(Menu): layout.operator("gpencil.active_frames_delete_all", text="Delete Frame") +class GPENCIL_MT_cleanup(Menu): + bl_label = "Clean Up" + + def draw(self, context): + layout = self.layout + layout.operator("gpencil.frame_clean_loose", text="Loose Points") + layout.separator() + + 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.reproject") + + class GPENCIL_UL_annotation_layer(UIList): def draw_item(self, context, layout, data, item, icon, active_data, active_propname, index): # assert(isinstance(item, bpy.types.GPencilLayer) @@ -805,6 +816,7 @@ classes = ( GPENCIL_MT_snap, GPENCIL_MT_separate, + GPENCIL_MT_cleanup, GPENCIL_MT_gpencil_draw_specials, GPENCIL_MT_gpencil_draw_delete, diff --git a/release/scripts/startup/bl_ui/space_view3d.py b/release/scripts/startup/bl_ui/space_view3d.py index a26d99e9ae9..2edd1815c08 100644 --- a/release/scripts/startup/bl_ui/space_view3d.py +++ b/release/scripts/startup/bl_ui/space_view3d.py @@ -3633,7 +3633,7 @@ class VIEW3D_MT_edit_gpencil(Menu): layout.separator() - layout.operator_menu_enum("gpencil.frame_clean_fill", text="Clean Boundary Strokes...", property="mode") + layout.menu("GPENCIL_MT_cleanup") class VIEW3D_MT_sculpt_gpencil(Menu): @@ -4959,7 +4959,7 @@ class VIEW3D_MT_gpencil_edit_specials(Menu): if is_3d_view: layout.separator() - layout.operator("gpencil.reproject") + layout.menu("GPENCIL_MT_cleanup") class VIEW3D_MT_gpencil_sculpt_specials(Menu): |