Animation blending improved and Animation Override added

This commit is contained in:
viktorljung
2016-02-18 16:34:18 +01:00
parent debb1881bf
commit 3c9c95cff4
9 changed files with 279 additions and 200 deletions
+9
View File
@@ -133,7 +133,16 @@ struct ModelJob : RenderJob
}
animationData.time = (double)animationComponent["Time" + std::to_string(i)];
animationData.weight = (double)animationComponent["Weight" + std::to_string(i)];
if((int)animationComponent["BlendType" + std::to_string(i)].Enum("Additive") == (int)animationComponent["BlendType" + std::to_string(i)]) {
animationData.blendType = Skeleton::BlendType::Additive;
} else if ((int)animationComponent["BlendType" + std::to_string(i)].Enum("Blend") == (int)animationComponent["BlendType" + std::to_string(i)]) {
animationData.blendType = Skeleton::BlendType::Blend;
} else if ((int)animationComponent["BlendType" + std::to_string(i)].Enum("Override") == (int)animationComponent["BlendType" + std::to_string(i)]) {
animationData.blendType = Skeleton::BlendType::Override;
}
animationData.level = (int)animationComponent["Level" + std::to_string(i)];
Animations.push_back(animationData);
}
}