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>2017-11-06 17:57:18 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2017-11-06 17:57:18 +0300
commite00cbb80bc5e472bb2d3e0c048a3cafec33d5bbb (patch)
treefbd8efb2ad4277456add284b8afe4dd2badb33e0 /io_scene_fbx
parent7a75719ec322cd52d976a71b8e61006716eb7697 (diff)
Fix T53254: Fbx import assertion error on some Enum custom property.
Do not try to get some string namecode of Enum items if string part of the custom FBX Enum property is empty! Just stick to basic int value in this case.
Diffstat (limited to 'io_scene_fbx')
-rw-r--r--io_scene_fbx/__init__.py2
-rw-r--r--io_scene_fbx/import_fbx.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 055fe86e..943df0b4 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, 8, 3),
+ "version": (3, 8, 4),
"blender": (2, 79, 1),
"location": "File > Import-Export",
"description": "FBX IO meshes, UV's, vertex colors, materials, textures, cameras, lamps and actions",
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index 91ca2154..4757d2ef 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -343,7 +343,7 @@ def blen_read_custom_properties(fbx_obj, blen_obj, settings):
elif prop_type in {b'Enum', b'enum'}:
assert(fbx_prop.props_type[4:6] == bytes((data_types.INT32, data_types.STRING)))
val = fbx_prop.props[4]
- if settings.use_custom_props_enum_as_string:
+ if settings.use_custom_props_enum_as_string and fbx_prop.props[5]:
enum_items = fbx_prop.props[5].decode('utf-8').split('~')
assert(val >= 0 and val < len(enum_items))
blen_obj[prop_name] = enum_items[val]