Fix T47360: Image loading fails when accessible from the CWD

This commit is contained in:
Campbell Barton
2016-02-08 18:19:50 +11:00
parent f77110e789
commit dc2a01ca05

View File

@@ -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: