HACK: For some reason Blender likes to create a first frame that doesn't start at time 0

This commit is contained in:
2015-10-21 15:37:49 +02:00
parent 2df78e011a
commit e7c1dc20ba
2 changed files with 5 additions and 1 deletions
+4
View File
@@ -293,6 +293,10 @@ dd::RawModel::RawModel(std::string fileName)
Skeleton::Animation::Keyframe animationFrame;
animationFrame.Index = keyframe;
animationFrame.Time = frameTimes[keyframe] / animation->mTicksPerSecond;
// HACK: For some reason Blender likes to create a first frame that doesn't start at time 0
if (keyframe == 0) {
animationFrame.Time = 0;
}
for (auto &kv2 : kv.second) {
int boneID = kv2.first;
auto &property = kv2.second;