diff options
-rw-r--r-- | io_scene_fbx/__init__.py | 2 | ||||
-rwxr-xr-x | io_scene_fbx/fbx2json.py | 2 | ||||
-rw-r--r-- | io_scene_fbx/import_fbx.py | 4 | ||||
-rw-r--r-- | io_scene_fbx/parse_fbx.py | 2 |
4 files changed, 7 insertions, 3 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index e9180ea2..661955bc 100644 --- a/io_scene_fbx/__init__.py +++ b/io_scene_fbx/__init__.py @@ -21,7 +21,7 @@ bl_info = { "name": "FBX format", "author": "Campbell Barton, Bastien Montagne, Jens Restemeier", - "version": (3, 7, 6), + "version": (3, 7, 7), "blender": (2, 77, 0), "location": "File > Import-Export", "description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions", diff --git a/io_scene_fbx/fbx2json.py b/io_scene_fbx/fbx2json.py index 68ceb5b2..21b0fcc7 100755 --- a/io_scene_fbx/fbx2json.py +++ b/io_scene_fbx/fbx2json.py @@ -198,6 +198,8 @@ def parse(fn, use_namedtuple=True): raise IOError("Invalid header") fbx_version = read_uint(read) + if fbx_version >= 7500: + raise IOError("Unsupported FBX version (%d), binary format is incompatible!" % fbx_version) while True: elem = read_elem(read, tell, use_namedtuple) diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py index 75a8db65..46cef68a 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -2250,11 +2250,11 @@ def load(operator, context, filepath="", try: elem_root, version = parse_fbx.parse(filepath) - except: + except Exception as e: import traceback traceback.print_exc() - operator.report({'ERROR'}, "Couldn't open file %r" % filepath) + operator.report({'ERROR'}, "Couldn't open file %r (%s)" % (filepath, e)) return {'CANCELLED'} if version < 7100: diff --git a/io_scene_fbx/parse_fbx.py b/io_scene_fbx/parse_fbx.py index 87f8624f..220d88e0 100644 --- a/io_scene_fbx/parse_fbx.py +++ b/io_scene_fbx/parse_fbx.py @@ -159,6 +159,8 @@ def parse(fn, use_namedtuple=True): raise IOError("Invalid header") fbx_version = read_uint(read) + if fbx_version >= 7500: + raise IOError("Unsupported FBX version (%d), binary format is incompatible!" % fbx_version) while True: elem = read_elem(read, tell, use_namedtuple) |