diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-08-17 23:17:43 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-08-17 23:17:43 +0300 |
commit | 34564dc442de355acfb7edd426a1dc265f0d761a (patch) | |
tree | 4b40da7cd904485965f6dae745a3dac242218e6f /io_scene_fbx/export_fbx_bin.py | |
parent | 94c9c4ee3370d1feb42fc978a1f0d2db07cb9431 (diff) |
Fix T45813: FBX export: add dummy stringification of custom props which are not directly supported by FBX format.
This allows some thrid party app to have someting to parse if needed.
Quite obviously, this only applies to exporter.
Diffstat (limited to 'io_scene_fbx/export_fbx_bin.py')
-rw-r--r-- | io_scene_fbx/export_fbx_bin.py | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py index 58cfea1b..6e1fc6af 100644 --- a/io_scene_fbx/export_fbx_bin.py +++ b/io_scene_fbx/export_fbx_bin.py @@ -542,8 +542,13 @@ def fbx_data_element_custom_properties(props, bid): elem_props_set(props, "p_integer", k.encode(), v, custom=True) elif isinstance(v, float): elem_props_set(props, "p_double", k.encode(), v, custom=True) - elif list_val and len(list_val) == 3: - elem_props_set(props, "p_vector", k.encode(), list_val, custom=True) + elif list_val: + if len(list_val) == 3: + elem_props_set(props, "p_vector", k.encode(), list_val, custom=True) + else: + elem_props_set(props, "p_string", k.encode(), str(list_val), custom=True) + else: + elem_props_set(props, "p_string", k.encode(), str(v), custom=True) def fbx_data_empty_elements(root, empty, scene_data): |