[Bf-extensions-cvs] [098e55d6] blender-v2.79a-release: Fix T53254: Fbx import assertion error on some Enum custom property.

Bastien Montagne noreply at git.blender.org
Mon Jan 1 16:36:28 CET 2018


Commit: 098e55d61e3646f3813078234c52a8321acb45bc
Author: Bastien Montagne
Date:   Mon Nov 6 15:57:18 2017 +0100
Branches: blender-v2.79a-release
https://developer.blender.org/rBA098e55d61e3646f3813078234c52a8321acb45bc

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.

Conflicts:
	io_scene_fbx/__init__.py

===================================================================

M	io_scene_fbx/import_fbx.py

===================================================================

diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index 0eb415a5..17f27c64 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]



More information about the Bf-extensions-cvs mailing list