|
@@ -985,6 +985,10 @@ int64_t to_ktime(double ticks, const aiAnimation* anim) {
|
|
|
return (static_cast<int64_t>(ticks) / static_cast<int64_t>(anim->mTicksPerSecond)) * FBX::SECOND;
|
|
|
}
|
|
|
|
|
|
+int64_t to_ktime(double time) {
|
|
|
+ return (static_cast<int64_t>(time * FBX::SECOND));
|
|
|
+}
|
|
|
+
|
|
|
void FBXExporter::WriteObjects ()
|
|
|
{
|
|
|
if (!binary) {
|
|
@@ -2089,7 +2093,7 @@ void FBXExporter::WriteObjects ()
|
|
|
// position/translation
|
|
|
for (size_t ki = 0; ki < na->mNumPositionKeys; ++ki) {
|
|
|
const aiVectorKey& k = na->mPositionKeys[ki];
|
|
|
- times.push_back(to_ktime(k.mTime, anim));
|
|
|
+ times.push_back(to_ktime(k.mTime));
|
|
|
xval.push_back(k.mValue.x);
|
|
|
yval.push_back(k.mValue.y);
|
|
|
zval.push_back(k.mValue.z);
|
|
@@ -2103,7 +2107,7 @@ void FBXExporter::WriteObjects ()
|
|
|
times.clear(); xval.clear(); yval.clear(); zval.clear();
|
|
|
for (size_t ki = 0; ki < na->mNumRotationKeys; ++ki) {
|
|
|
const aiQuatKey& k = na->mRotationKeys[ki];
|
|
|
- times.push_back(to_ktime(k.mTime, anim));
|
|
|
+ times.push_back(to_ktime(k.mTime));
|
|
|
// TODO: aiQuaternion method to convert to Euler...
|
|
|
aiMatrix4x4 m(k.mValue.GetMatrix());
|
|
|
aiVector3D qs, qr, qt;
|
|
@@ -2121,7 +2125,7 @@ void FBXExporter::WriteObjects ()
|
|
|
times.clear(); xval.clear(); yval.clear(); zval.clear();
|
|
|
for (size_t ki = 0; ki < na->mNumScalingKeys; ++ki) {
|
|
|
const aiVectorKey& k = na->mScalingKeys[ki];
|
|
|
- times.push_back(to_ktime(k.mTime, anim));
|
|
|
+ times.push_back(to_ktime(k.mTime));
|
|
|
xval.push_back(k.mValue.x);
|
|
|
yval.push_back(k.mValue.y);
|
|
|
zval.push_back(k.mValue.z);
|