diff options
author | Pablo Dobarro <pablodp606@gmail.com> | 2021-02-04 20:03:42 +0300 |
---|---|---|
committer | Pablo Dobarro <pablodp606@gmail.com> | 2021-02-05 21:15:43 +0300 |
commit | 7d874b03433d19695f9e4e4bffb297d02c66c6eb (patch) | |
tree | 3d5fcf0634689395b7eff3b68da4265e11e90c14 /release | |
parent | faf45091b454bb99089e82533b12b549efb1a5c7 (diff) |
Image: Flip image operator
This implements an operator to flip the contents of an image buffer. It
supports flipping the image horizontally and vertically.
Reviewed By: JacquesLucke
Differential Revision: https://developer.blender.org/D10310
Diffstat (limited to 'release')
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index 342b72acb8c..73cc674858c 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -235,6 +235,7 @@ class IMAGE_MT_image(Menu): layout.menu("IMAGE_MT_image_invert") layout.operator("image.resize", text="Resize") + layout.menu("IMAGE_MT_image_flip") if ima and not show_render: if ima.packed_file: @@ -250,6 +251,13 @@ class IMAGE_MT_image(Menu): layout.operator("palette.extract_from_image", text="Extract Palette") layout.operator("gpencil.image_to_grease_pencil", text="Generate Grease Pencil") +class IMAGE_MT_image_flip(Menu): + bl_label = "Flip" + + def draw(self, _context): + layout = self.layout + layout.operator("image.flip", text="Horizontally").use_flip_horizontal = True + layout.operator("image.flip", text="Vertically").use_flip_vertical = True class IMAGE_MT_image_invert(Menu): bl_label = "Invert" @@ -1584,6 +1592,7 @@ classes = ( IMAGE_MT_select, IMAGE_MT_select_linked, IMAGE_MT_image, + IMAGE_MT_image_flip, IMAGE_MT_image_invert, IMAGE_MT_uvs, IMAGE_MT_uvs_showhide, |