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:
Diffstat (limited to 'io_scene_fbx/import_fbx.py')
-rw-r--r--io_scene_fbx/import_fbx.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index ec16b6d1..ba11757a 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -369,8 +369,10 @@ def blen_read_custom_properties(fbx_obj, blen_obj, settings):
val = fbx_prop.props[4]
if settings.use_custom_props_enum_as_string and fbx_prop.props[5]:
enum_items = fbx_prop.props[5].decode('utf-8', 'replace').split('~')
- assert(val >= 0 and val < len(enum_items))
- blen_obj[prop_name] = enum_items[val]
+ if val >= 0 and val < len(enum_items):
+ blen_obj[prop_name] = enum_items[val]
+ else:
+ print ("WARNING: User property '%s' has wrong enum value, skipped" % prop_name)
else:
blen_obj[prop_name] = val
else: