[Bf-extensions-cvs] [dce0ada] master: Revert "FBX import: do not fail on missing/unreadable image file."

Bastien Montagne noreply at git.blender.org
Wed Jul 30 15:39:05 CEST 2014


Commit: dce0ada8550326e919a30cba04421b161db94634
Author: Bastien Montagne
Date:   Wed Jul 30 15:37:33 2014 +0200
Branches: master
https://developer.blender.org/rBAdce0ada8550326e919a30cba04421b161db94634

Revert "FBX import: do not fail on missing/unreadable image file."

This reverts commit 21a8a5824dde50f060716047a12c748b4413b04d.

Fiw was done at a lower level (bpy.path.resolve_ncase()).

===================================================================

M	io_scene_fbx/import_fbx.py

===================================================================

diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index 71641c1..eca8f91 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -1260,22 +1260,18 @@ def blen_read_texture(fbx_tmpl, fbx_obj, basedir, image_cache,
     if image is not None:
         return image
 
-    try:
-        image = image_utils.load_image(
-            filepath,
-            dirname=basedir,
-            place_holder=True,
-            recursive=use_image_search,
-            )
+    image = image_utils.load_image(
+        filepath,
+        dirname=basedir,
+        place_holder=True,
+        recursive=use_image_search,
+        )
 
-        image_cache[filepath] = image
-        # name can be ../a/b/c
-        image.name = os.path.basename(elem_name_utf8)
+    image_cache[filepath] = image
+    # name can be ../a/b/c
+    image.name = os.path.basename(elem_name_utf8)
 
-        return image
-    except Exception as e:
-        print("Warning, failed to load image file %s..." % filepath);
-        return None
+    return image
 
 
 def blen_read_camera(fbx_tmpl, fbx_obj, global_scale):



More information about the Bf-extensions-cvs mailing list