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-06-15 17:31:12 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-06-15 17:31:12 +0300
commit15ec348c417d7fc7dd47216d55b1b16926cb67e4 (patch)
tree907611ded69470349f3627ea2e449e66d25e30a6 /io_scene_fbx/import_fbx.py
parent6ee73835f0f448008ff69a2ac8eb0b6a20567c62 (diff)
Fix T45080: Scale of exported .fbx is wrong in 2.75.
Man... this scaling issue becomes ridiculous! Tried to fix it again also regarding (what is supposed to be) FBX scale/units handling. Since we store Blender's unit system (with 1BU == 1m in case of none) as the UnitScaleFactor element, we actually *do not* have to also scale objects themselves... In theory. Since I have to wait hours here to get my UE4 repo updated and rebuild the monster, comitting this now, we'll see later for FBXSDK behavior.
Diffstat (limited to 'io_scene_fbx/import_fbx.py')
-rw-r--r--io_scene_fbx/import_fbx.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/io_scene_fbx/import_fbx.py b/io_scene_fbx/import_fbx.py
index 4218a4e7..7a2808db 100644
--- a/io_scene_fbx/import_fbx.py
+++ b/io_scene_fbx/import_fbx.py
@@ -42,6 +42,7 @@ from . import parse_fbx, fbx_utils
from .parse_fbx import data_types, FBXElem
from .fbx_utils import (
PerfMon,
+ units_blender_to_fbx_factor,
units_convertor_iter,
array_to_matrix4,
similar_values,
@@ -2152,7 +2153,7 @@ def load(operator, context, filepath="",
# FBX default base unit seems to be the centimeter, while raw Blender Unit is equivalent to the meter...
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
+ global_scale *= (unit_scale / units_blender_to_fbx_factor(context.scene))
# Compute global matrix and scale.
if not use_manual_orientation:
axis_forward = (elem_props_get_integer(fbx_settings_props, b'FrontAxis', 1),