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-05-22 23:23:10 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-05-22 23:23:10 +0300
commit6fccd8c57cca34ab2a78f5e86f963b7569993515 (patch)
tree43f60f6f94e131f39bacc783010a89d3514f5b4a /io_scene_fbx/import_fbx.py
parent7d4c4744b1134af469f8ef6d95c6a3781eed50e3 (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!
Diffstat (limited to 'io_scene_fbx/import_fbx.py')
-rw-r--r--io_scene_fbx/import_fbx.py4
1 files changed, 3 insertions, 1 deletions
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),