diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2014-02-26 03:58:14 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-02-26 03:58:14 +0400 |
commit | 70924a7b2e018d18badfd731cac39702acfa5b08 (patch) | |
tree | ee99229f1af78dcb6f27236e806b78b86a6e5ce8 /release/scripts/startup/bl_operators/image.py | |
parent | 593d856217804bf5fcb2d33f8370bb8544c81316 (diff) |
Fix T38548: Edit externally always uses first frame only
Diffstat (limited to 'release/scripts/startup/bl_operators/image.py')
-rw-r--r-- | release/scripts/startup/bl_operators/image.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/release/scripts/startup/bl_operators/image.py b/release/scripts/startup/bl_operators/image.py index 0d3d45d98fe..1653459bd71 100644 --- a/release/scripts/startup/bl_operators/image.py +++ b/release/scripts/startup/bl_operators/image.py @@ -90,8 +90,9 @@ class EditExternally(Operator): def invoke(self, context, event): import os + sd = context.space_data try: - image = context.space_data.image + image = sd.image except AttributeError: self.report({'ERROR'}, "Context incorrect, image not found") return {'CANCELLED'} @@ -100,7 +101,12 @@ class EditExternally(Operator): self.report({'ERROR'}, "Image is packed, unpack before editing") return {'CANCELLED'} - filepath = bpy.path.abspath(image.filepath, library=image.library) + if sd.type == 'IMAGE_EDITOR': + filepath = image.filepath_from_user(sd.image_user) + else: + filepath = image.filepath + + filepath = bpy.path.abspath(filepath, library=image.library) self.filepath = os.path.normpath(filepath) self.execute(context) |