Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2016-02-08 10:19:50 +0300
committerCampbell Barton <ideasman42@gmail.com>2016-02-08 10:21:20 +0300
commitdc2a01ca059d160f748064167200f275cede40a7 (patch)
tree40f2bb395bc671f9b7283bf4d11fa0919f583c16 /release
parentf77110e789beda945d3725f19e6090ed20e2c613 (diff)
Fix T47360: Image loading fails when accessible from the CWD
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy_extras/image_utils.py4
1 files changed, 4 insertions, 0 deletions
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: