diff options
author | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2016-02-20 16:52:36 +0300 |
---|---|---|
committer | Brecht Van Lommel <brechtvanlommel@gmail.com> | 2019-04-18 21:07:55 +0300 |
commit | 64bcdd65bf0727c5e39ac2b3f32bf897bfbf07a1 (patch) | |
tree | 1deb0d53867356cab6feecb0fa2f62c44ad88899 /release/scripts/startup/bl_ui/space_image.py | |
parent | 690ed63eb55d1c52b051d8ce40e76e1b57291f29 (diff) |
Images: support packing edited images as OpenEXR or PNG.
This way float and multilayer images can now be packed without data loss. This
removes the as_png option and always uses the appropriate file format depending
on the image contents.
Diffstat (limited to 'release/scripts/startup/bl_ui/space_image.py')
-rw-r--r-- | release/scripts/startup/bl_ui/space_image.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/release/scripts/startup/bl_ui/space_image.py b/release/scripts/startup/bl_ui/space_image.py index a233295c2c5..7d3b76683e9 100644 --- a/release/scripts/startup/bl_ui/space_image.py +++ b/release/scripts/startup/bl_ui/space_image.py @@ -228,18 +228,12 @@ class IMAGE_MT_image(Menu): layout.menu("IMAGE_MT_image_invert") if not show_render: - if not ima.packed_file: - layout.separator() + layout.separator() + if ima.packed_file: + layout.operator("image.pack", text="Repack") + else: layout.operator("image.pack", text="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 - class IMAGE_MT_image_invert(Menu): bl_label = "Invert" |