diff options
author | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-22 23:23:10 +0300 |
---|---|---|
committer | Bastien Montagne <montagne29@wanadoo.fr> | 2015-05-22 23:23:10 +0300 |
commit | 6fccd8c57cca34ab2a78f5e86f963b7569993515 (patch) | |
tree | 43f60f6f94e131f39bacc783010a89d3514f5b4a | |
parent | 7d4c4744b1134af469f8ef6d95c6a3781eed50e3 (diff) |
FBX Import: fix scale handling to match again our exporter's one.
Still unsure we are doing the 'right' thing here, but at least let's be consistent
between our importer and exporter!
-rw-r--r-- | io_scene_fbx/__init__.py | 2 | ||||
-rw-r--r-- | io_scene_fbx/import_fbx.py | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py index 1d613b49..c9931ce6 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, 3, 1), + "version": (3, 3, 2), "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/import_fbx.py b/io_scene_fbx/import_fbx.py index 33950f41..4218a4e7 100644 --- a/io_scene_fbx/import_fbx.py +++ b/io_scene_fbx/import_fbx.py @@ -2150,7 +2150,9 @@ def load(operator, context, filepath="", return {'CANCELLED'} # FBX default base unit seems to be the centimeter, while raw Blender Unit is equivalent to the meter... - global_scale *= elem_props_get_number(fbx_settings_props, b'UnitScaleFactor', 100.0) / 100.0 + unit_scale = elem_props_get_number(fbx_settings_props, b'UnitScaleFactor', 1.0) + unit_scale_org = elem_props_get_number(fbx_settings_props, b'OriginalUnitScaleFactor', 1.0) + global_scale *= unit_scale / unit_scale_org / 100.0 # Compute global matrix and scale. if not use_manual_orientation: axis_forward = (elem_props_get_integer(fbx_settings_props, b'FrontAxis', 1), |