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>2011-12-10 01:07:37 +0400
committerCampbell Barton <ideasman42@gmail.com>2011-12-10 01:07:37 +0400
commit82480e99954f3618e953c5f669577efd72ba3f1f (patch)
treef910ffb34b12350c20e790de5f250243f4e01b3b /release
parent71ea408c736583fc0e009c5a97340d4493378ec3 (diff)
fix for bpy_extras.image_utils.load_image() making a placeholder image when passed a path in bytes.
made OBJ import fail when the image was missing.
Diffstat (limited to 'release')
-rw-r--r--release/scripts/modules/bpy_extras/image_utils.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/release/scripts/modules/bpy_extras/image_utils.py b/release/scripts/modules/bpy_extras/image_utils.py
index 52050b08bc7..6d02b2b7af9 100644
--- a/release/scripts/modules/bpy_extras/image_utils.py
+++ b/release/scripts/modules/bpy_extras/image_utils.py
@@ -104,7 +104,10 @@ def load_image(imagepath,
return _image_load(nfilepath)
if place_holder:
- image = bpy.data.images.new(bpy.path.basename(imagepath), 128, 128)
+ name = bpy.path.basename(imagepath)
+ if type(name) == bytes:
+ name = name.decode('utf-8', "replace")
+ image = bpy.data.images.new(name, 128, 128)
# allow the path to be resolved later
image.filepath = imagepath
return image