From dc2a01ca059d160f748064167200f275cede40a7 Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Mon, 8 Feb 2016 18:19:50 +1100 Subject: Fix T47360: Image loading fails when accessible from the CWD --- release/scripts/modules/bpy_extras/image_utils.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'release') diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py index f197596fec0..d078d63a417 100644 --- a/release/scripts/modules/bpy_extras/image_utils.py +++ b/release/scripts/modules/bpy_extras/image_utils.py @@ -95,6 +95,10 @@ def load_image(imagepath, if convert_callback: path = convert_callback(path) + # Ensure we're not relying on the 'CWD' to resolve the path. + if not os.path.isabs(path): + path = os.path.abspath(path) + try: image = bpy.data.images.load(path, check_existing) except RuntimeError: -- cgit v1.2.3