[Bf-blender-cvs] [1b90397] master: Fix unnecessary separators in image editor Image menu.

Brecht Van Lommel noreply at git.blender.org
Sat Feb 20 20:23:35 CET 2016


Commit: 1b9039752ac922355aab565f12d8db3edd834e06
Author: Brecht Van Lommel
Date:   Sat Feb 20 20:18:58 2016 +0100
Branches: master
https://developer.blender.org/rB1b9039752ac922355aab565f12d8db3edd834e06

Fix unnecessary separators in image editor Image menu.

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

M	release/scripts/startup/bl_ui/space_image.py

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

diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py
index d29cd18..10b4e24 100644
--- a/release/scripts/startup/bl_ui/space_image.py
+++ b/release/scripts/startup/bl_ui/space_image.py
@@ -208,19 +208,18 @@ class IMAGE_MT_image(Menu):
             layout.menu("IMAGE_MT_image_invert")
 
             if not show_render:
-                layout.separator()
-
                 if not ima.packed_file:
+                    layout.separator()
                     layout.operator("image.pack")
 
                 # only for dirty && specific image types, perhaps
                 # this could be done in operator poll too
                 if ima.is_dirty:
                     if ima.source in {'FILE', 'GENERATED'} and ima.type != 'OPEN_EXR_MULTILAYER':
+                        if ima.packed_file:
+                            layout.separator()
                         layout.operator("image.pack", text="Pack As PNG").as_png = True
 
-            layout.separator()
-
 
 class IMAGE_MT_image_invert(Menu):
     bl_label = "Invert"




More information about the Bf-blender-cvs mailing list