mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix T47360: Image loading fails when accessible from the CWD
This commit is contained in:
parent
f77110e789
commit
dc2a01ca05
1 changed files with 4 additions and 0 deletions
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue