Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 0 additions & 1 deletion makehuman/plugins/9_export_fbx/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,6 @@ def getConfig(self):
cfg.feetOnGround = self.feetOnGround.selected
cfg.scale,cfg.unit = self.taskview.getScale()
cfg.binary = self.binary.selected
cfg.scale *= 10

cfg.hiddenGeom = self.hiddenGeom.selected

Expand Down
5 changes: 2 additions & 3 deletions makehuman/plugins/9_export_fbx/fbx_binary.py
Original file line number Diff line number Diff line change
Expand Up @@ -731,9 +731,8 @@ def fbx_header_elements(root, config, filepath, time=None):

mesh_orientation = getMeshOrientation(config)
up_axis, front_axis, coord_axis = RIGHT_HAND_AXES[mesh_orientation]
# Currently not sure about that, but looks like default unit of FBX is cm...
#scale_factor = 10.0/config.scale # MH scales the mesh coordinates, the scale factor is a constant
scale_factor = 10.0
# FBX unit scale is expressed in centimeters.
scale_factor = 10.0 / config.scale
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])
Expand Down
7 changes: 4 additions & 3 deletions makehuman/plugins/9_export_fbx/fbx_header.py
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ def writeHeader(fp, filepath, config):
from . import fbx_utils
mesh_orientation = fbx_utils.getMeshOrientation(config)
up_axis, front_axis, coord_axis = fbx_utils.RIGHT_HAND_AXES[mesh_orientation]
scale_factor = 10.0 / config.scale

fp.write("""; FBX 7.3.0 project file
; Exported from MakeHuman TM (www.makehumancommunity.org)
Expand Down Expand Up @@ -126,16 +127,16 @@ def writeHeader(fp, filepath, config):
P: "CoordAxisSign", "int", "Integer", "",%s
P: "OriginalUpAxis", "int", "Integer", "",-1
P: "OriginalUpAxisSign", "int", "Integer", "",1
P: "UnitScaleFactor", "double", "Number", "",10
P: "OriginalUnitScaleFactor", "double", "Number", "",1
P: "UnitScaleFactor", "double", "Number", "",%s
P: "OriginalUnitScaleFactor", "double", "Number", "",%s
P: "AmbientColor", "ColorRGB", "Color", "",0,0,0
P: "DefaultCamera", "KString", "", "", "Producer Perspective"
P: "TimeMode", "enum", "", "",0
P: "TimeSpanStart", "KTime", "Time", "",0
P: "TimeSpanStop", "KTime", "Time", "",46186158000
P: "CustomFrameRate", "double", "Number", "",-1
}
}""" % (up_axis[0], up_axis[0], front_axis[0], front_axis[1], coord_axis[0], coord_axis[1]) + """
}""" % (up_axis[0], up_axis[0], front_axis[0], front_axis[1], coord_axis[0], coord_axis[1], scale_factor, scale_factor) + """

; Documents Description
;------------------------------------------------------------------
Expand Down