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 22:10:06 +0300
committerBastien Montagne <montagne29@wanadoo.fr>2015-06-15 22:10:06 +0300
commitffaddb3a6f59dc9a2177c27391c8fd8444af3257 (patch)
tree7d0a89d2706a5a3543e077fe50c40f135f0e596b /io_scene_fbx/__init__.py
parent02b82c4fc10d1755fb3176b2aae66d060eea6015 (diff)
Final step (hopefully) in unit/scale Hell.
So, it appears some importers (at least UE4) do not use UnitScaleFactor defined by FBX, which is assumed to be a way to say 'this FBX file uses units n times default FBX unit' (default FBX unit being centimeter - afaik, at least I saw some FBX from Max with a UnitScaleFactor of 2.54 - inches). Hence, we have to add yet another stupid option to apply that 'unit scaling' to objects instead (as part of global scaling)... Hurra.
Diffstat (limited to 'io_scene_fbx/__init__.py')
-rw-r--r--io_scene_fbx/__init__.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/io_scene_fbx/__init__.py b/io_scene_fbx/__init__.py
index c4bd9b71..ece5f976 100644
--- a/io_scene_fbx/__init__.py
+++ b/io_scene_fbx/__init__.py
@@ -235,6 +235,13 @@ class ExportFBX(bpy.types.Operator, ExportHelper, IOFBXOrientationHelper):
default=1.0,
)
# 7.4 only
+ apply_unit_scale = BoolProperty(
+ name="Apply Unit",
+ description="Scale all data according to current Blender size, to match default FBX unit "
+ "(centimeter, some importers do not handle UnitScaleFactor properly)",
+ default=True,
+ )
+ # 7.4 only
bake_space_transform = BoolProperty(
name="!EXPERIMENTAL! Apply Transform",
description="Bake space transform into object data, avoids getting unwanted rotations to objects when "
@@ -424,6 +431,8 @@ class ExportFBX(bpy.types.Operator, ExportHelper, IOFBXOrientationHelper):
layout.prop(self, "version")
layout.prop(self, "use_selection")
layout.prop(self, "global_scale")
+ if is_74bin:
+ layout.prop(self, "apply_unit_scale")
layout.prop(self, "axis_forward")
layout.prop(self, "axis_up")
if is_74bin: