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>2015-12-02 14:18:29 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-12-02 14:21:12 +0300
commite9de9eed5d91aedded71131118b0252aa078b947 (patch)
tree62da5b5592350d09153606b524a8e5b101e05c88
parent5e69d4b4e7580ccc26f38062455bca28ec52530c (diff)
Fix T46910: FBX import error due to unrecognized property flags set.
Get rid of those flags asserts in read code, we do not use them anyway, and our goal is not to be a FBX format validator, especially since there is no public FBX format...
-rw-r--r--io_scene_fbx/__init__.py2
-rw-r--r--io_scene_fbx/data_types.py4
-rw-r--r--io_scene_fbx/import_fbx.py3
3 files changed, 5 insertions, 4 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index b3c05e50..6e23b499 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, 6, 3),
+ "version": (3, 6, 4),
"blender": (2, 76, 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/data_types.py b/io_scene_fbx/data_types.py
index 3a505be8..129806c9 100644
--- a/io_scene_fbx/data_types.py
+++ b/io_scene_fbx/data_types.py
@@ -36,6 +36,10 @@ FLOAT64_ARRAY = b'd'[0]
BOOL_ARRAY = b'b'[0]
BYTE_ARRAY = b'c'[0]
+# Some other misc defines
+# Known combinations so far - supposed meaning: A = animatable, A+ = animated, U = UserProp
+# VALID_NUMBER_FLAGS = {b'A', b'A+', b'AU', b'A+U'} # Not used...
+
# array types - actual length may vary (depending on underlying C implementation)!
import array
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index 128dab1a..d3dbf983 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -184,7 +184,6 @@ def elem_props_get_color_rgb(elem, elem_prop_id, default=None):
# FBX version 7300
assert(elem_prop.props[1] == b'Color')
assert(elem_prop.props[2] == b'')
- assert(elem_prop.props[3] in {b'A', b'A+', b'AU'})
else:
assert(elem_prop.props[1] == b'ColorRGB')
assert(elem_prop.props[2] == b'Color')
@@ -211,7 +210,6 @@ def elem_props_get_number(elem, elem_prop_id, default=None):
else:
assert(elem_prop.props[1] == b'Number')
assert(elem_prop.props[2] == b'')
- assert(elem_prop.props[3] in {b'A', b'A+', b'AU'})
# we could allow other number types
assert(elem_prop.props_type[4] == data_types.FLOAT64)
@@ -275,7 +273,6 @@ def elem_props_get_visibility(elem, elem_prop_id, default=None):
assert(elem_prop.props[0] == elem_prop_id)
assert(elem_prop.props[1] == b'Visibility')
assert(elem_prop.props[2] == b'')
- assert(elem_prop.props[3] in {b'A', b'A+', b'AU'})
# we could allow other number types
assert(elem_prop.props_type[4] == data_types.FLOAT64)