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-20 21:43:08 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-08-20 21:43:08 +0300
commit962d1d0e8c3905589da7b6866ec207b0bb3bb527 (patch)
treec0a3ebe66fc0ce57e95a46189c4b5273e14ccaa3 /io_scene_fbx/export_fbx_bin.py
parent6d145221a1ec1846f3d5a0855f45d1a1bd4e1915 (diff)
FBX Export: Write version of FBX addon too!
Grrrr, could have sweared I had done that since ages...
Diffstat (limited to 'io_scene_fbx/export_fbx_bin.py')
-rw-r--r--io_scene_fbx/export_fbx_bin.py11
1 files changed, 9 insertions, 2 deletions
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index 6e1fc6af..365e98ee 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -2547,6 +2547,11 @@ def fbx_header_elements(root, scene_data, time=None):
app_vendor = "Blender Foundation"
app_name = "Blender (stable FBX IO)"
app_ver = bpy.app.version_string
+
+ import addon_utils
+ import sys
+ addon_ver = addon_utils.module_bl_info(sys.modules[__package__])['version']
+
# ##### Start of FBXHeaderExtension element.
header_ext = elem_empty(root, b"FBXHeaderExtension")
@@ -2569,7 +2574,8 @@ def fbx_header_elements(root, scene_data, time=None):
elem_data_single_int32(elem, b"Second", time.second)
elem_data_single_int32(elem, b"Millisecond", time.microsecond // 1000)
- elem_data_single_string_unicode(header_ext, b"Creator", "%s - %s" % (app_name, app_ver))
+ elem_data_single_string_unicode(header_ext, b"Creator", "%s - %s - %d.%d.%d"
+ % (app_name, app_ver, addon_ver[0], addon_ver[1], addon_ver[2]))
# 'SceneInfo' seems mandatory to get a valid FBX file...
# TODO use real values!
@@ -2613,7 +2619,8 @@ def fbx_header_elements(root, scene_data, time=None):
"".format(time.year, time.month, time.day, time.hour, time.minute, time.second,
time.microsecond * 1000))
- elem_data_single_string_unicode(root, b"Creator", "%s - %s" % (app_name, app_ver))
+ elem_data_single_string_unicode(root, b"Creator", "%s - %s - %d.%d.%d"
+ % (app_name, app_ver, addon_ver[0], addon_ver[1], addon_ver[2]))
# ##### Start of GlobalSettings element.
global_settings = elem_empty(root, b"GlobalSettings")