Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBastien Montagne <montagne29@wanadoo.fr>2016-09-22 17:55:38 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-09-22 17:55:38 +0300
commit80cfaeca0954b51d950a5cb27312768a7a99af50 (patch)
tree712437102dbb500e1d91d65c23be6eba780e1809 /io_scene_fbx
parent4ed120fafb157aeeb9fbdb072a0e75375d658e24 (diff)
Fix T49412: We do not support FBX 7500 and above, at least properly report it to users.
Those ... people? at AD changed the whole format on binary level it'd seem, even low-level, binary parsing is broken with those files, nothing else to do but go back to binary hacking/inspection of new files if we want to support them... will let that to someone else, FBX has successfully exhausted my patience since years already, even all the backup emergency reserves I had.
Diffstat (limited to 'io_scene_fbx')
-rw-r--r--io_scene_fbx/__init__.py2
-rwxr-xr-xio_scene_fbx/fbx2json.py2
-rw-r--r--io_scene_fbx/import_fbx.py4
-rw-r--r--io_scene_fbx/parse_fbx.py2
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)