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-08-17 23:17:43 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-08-17 23:17:43 +0300
commit34564dc442de355acfb7edd426a1dc265f0d761a (patch)
tree4b40da7cd904485965f6dae745a3dac242218e6f /io_scene_fbx
parent94c9c4ee3370d1feb42fc978a1f0d2db07cb9431 (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')
-rw-r--r--io_scene_fbx/__init__.py2
-rw-r--r--io_scene_fbx/export_fbx_bin.py9
2 files changed, 8 insertions, 3 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index 5e3f93a5..5bd609a2 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, 5, 3),
+ "version": (3, 5, 4),
"blender": (2, 74, 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/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):