Skip to content

Commit

Permalink
Merge pull request #18 from connieprice/master
Browse files Browse the repository at this point in the history
Fixed importing .animation file animations onto objects that already have animations.
  • Loading branch information
kythyria authored Jun 14, 2021
2 parents 0444c66 + 1059ac6 commit 9c608d9
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions PD2ModelParser/Importers/AnimationImporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ public static void Import(FullModelData fmd, string path) {
if (object3D != null) {
Log.Default.Info("Found " + animationObject.Name);

object3D.Animations.Clear(); // Kill the old anims.

if (animationObject.RotationKeyframes.Count > 0) {
QuatLinearRotationController quatLinearRotationController = AddRotations(object3D, animationObject.RotationKeyframes);
fmd.AddSection(quatLinearRotationController);
Expand Down

0 comments on commit 9c608d9

Please sign in to comment.