diff options
Diffstat (limited to 'release/scripts/startup/bl_ui/properties_grease_pencil_common.py')
-rw-r--r-- | release/scripts/startup/bl_ui/properties_grease_pencil_common.py | 27 |
1 files changed, 27 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 07c9fc363b5..f16528103ff 100644 --- a/release/scripts/startup/bl_ui/properties_grease_pencil_common.py +++ b/release/scripts/startup/bl_ui/properties_grease_pencil_common.py @@ -279,6 +279,31 @@ class GPENCIL_MT_snap(Menu): layout.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid") +class GPENCIL_MT_snap_pie(Menu): + bl_label = "Snap" + + def draw(self, _context): + layout = self.layout + pie = layout.menu_pie() + + pie.operator("view3d.snap_cursor_to_grid", text="Cursor to Grid", icon='CURSOR') + pie.operator("gpencil.snap_to_grid", text="Selection to Grid", icon='RESTRICT_SELECT_OFF') + pie.operator("gpencil.snap_cursor_to_selected", text="Cursor to Selected", icon='CURSOR') + pie.operator( + "gpencil.snap_to_cursor", + text="Selection to Cursor", + icon='RESTRICT_SELECT_OFF' + ).use_offset = False + pie.operator( + "gpencil.snap_to_cursor", + text="Selection to Cursor (Keep Offset)", + icon='RESTRICT_SELECT_OFF' + ).use_offset = True + pie.separator() + pie.operator("view3d.snap_cursor_to_center", text="Cursor to World Origin", icon='CURSOR') + pie.separator() + + class GPENCIL_MT_move_to_layer(Menu): bl_label = "Move to Layer" @@ -380,6 +405,7 @@ class GPENCIL_MT_cleanup(Menu): layout = self.layout layout.operator("gpencil.frame_clean_loose", text="Delete Loose Points") + layout.operator("gpencil.frame_clean_duplicate", text="Delete Duplicated Frames") if ob.mode != 'PAINT_GPENCIL': layout.operator("gpencil.stroke_merge_by_distance", text="Merge by Distance") @@ -901,6 +927,7 @@ class GreasePencilFlipTintColors(Operator): classes = ( GPENCIL_MT_snap, + GPENCIL_MT_snap_pie, GPENCIL_MT_cleanup, GPENCIL_MT_move_to_layer, GPENCIL_MT_layer_active, |