FBX export. to_ktime ticks was ok.

pull/1991/head
Michael Roer Pedersen 2018-06-01 09:24:53 +02:00
parent fceeaa72f4
commit b176513efa
2 changed files with 5 additions and 2 deletions

3
.gitignore vendored
View File

@ -87,3 +87,6 @@ lib64/assimp-vc120-mt.exp
xcuserdata xcuserdata
cmake-build-debug cmake-build-debug
/.vs
/code/assimp.vcxproj.user
*.user

View File

@ -980,9 +980,9 @@ aiMatrix4x4 get_world_transform(const aiNode* node, const aiScene* scene)
int64_t to_ktime(double ticks, const aiAnimation* anim) { int64_t to_ktime(double ticks, const aiAnimation* anim) {
if (anim->mTicksPerSecond <= 0) { if (anim->mTicksPerSecond <= 0) {
return static_cast<int64_t>(ticks * FBX::SECOND); return static_cast<int64_t>(ticks) * FBX::SECOND;
} }
return (static_cast<int64_t>(ticks / anim->mTicksPerSecond * FBX::SECOND)); return (static_cast<int64_t>(ticks) / static_cast<int64_t>(anim->mTicksPerSecond)) * FBX::SECOND;
} }
int64_t to_ktime(double time) { int64_t to_ktime(double time) {