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>2016-11-18 16:14:45 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2016-11-18 16:14:45 +0300
commitafeee1999be96e7a5eb5f35dca9f326d1646eeb4 (patch)
tree52ae6d94420b10d2b494787c3f421cb578bdb4a6 /io_scene_fbx
parent4f2529b587c4bd5be8364082e958e1a72a1ffd02 (diff)
Fix T50045: FBX Export Scale (global_scale) is applied twice.
Do not store export scaling, this is internal runtime data specific to exporter, it’s applied already in objetcs' matrices, and has nothing to do with actual FBX global scaling.
Diffstat (limited to 'io_scene_fbx')
-rw-r--r--io_scene_fbx/export_fbx_bin.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/io_scene_fbx/export_fbx_bin.py b/io_scene_fbx/export_fbx_bin.py
index 49e8e160..36e8ea10 100644
--- a/io_scene_fbx/export_fbx_bin.py
+++ b/io_scene_fbx/export_fbx_bin.py
@@ -2672,13 +2672,15 @@ def fbx_header_elements(root, scene_data, time=None):
props = elem_properties(global_settings)
up_axis, front_axis, coord_axis = RIGHT_HAND_AXES[scene_data.settings.to_axes]
+ # DO NOT take into account global scale here! That setting is applied to object transformations during export
+ # (in other words, this is pure blender-exporter feature, and has nothing to do with FBX data).
if scene_data.settings.apply_unit_scale:
# Unit scaling is applied to objects' scale, so our unit is effectively FBX one (centimeter).
scale_factor_org = 1.0
- scale_factor = scene_data.settings.global_scale / units_blender_to_fbx_factor(scene)
+ scale_factor = 1.0 / units_blender_to_fbx_factor(scene)
else:
scale_factor_org = units_blender_to_fbx_factor(scene)
- scale_factor = scene_data.settings.global_scale * units_blender_to_fbx_factor(scene)
+ scale_factor = scale_factor_org
elem_props_set(props, "p_integer", b"UpAxis", up_axis[0])
elem_props_set(props, "p_integer", b"UpAxisSign", up_axis[1])
elem_props_set(props, "p_integer", b"FrontAxis", front_axis[0])