diff options
Diffstat (limited to 'release/scripts/startup/bl_operators/image.py')
-rw-r--r-- | release/scripts/startup/bl_operators/image.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py index 4c04aa3b7f3..1b7d5e3a40d 100644 --- a/release/scripts/startup/bl_operators/image.py +++ b/release/scripts/startup/bl_operators/image.py @@ -67,7 +67,7 @@ class EditExternally(Operator): self.report({'ERROR'}, "Image path not set") return {'CANCELLED'} - if not os.path.exists(filepath): + if not os.path.exists(filepath) or not os.path.isfile(filepath): self.report({'ERROR'}, "Image path %r not found, image may be packed or " "unsaved" % filepath) @@ -96,6 +96,10 @@ class EditExternally(Operator): self.report({'ERROR'}, "Context incorrect, image not found") return {'CANCELLED'} + if image.packed_file: + self.report({'ERROR'}, "Image is packed, unpack before editing") + return {'CANCELLED'} + filepath = bpy.path.abspath(image.filepath, library=image.library) self.filepath = os.path.normpath(filepath) |