Skip to content

Commit

Permalink
1.5.2
Browse files Browse the repository at this point in the history
Changelog 3D
  • Loading branch information
soupday committed Aug 2, 2023
1 parent 8dd4632 commit dee6557
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 6 deletions.
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,18 @@
Changelog
=========

### 1.5.2
- Animation Retargeter fixes.
- AnimationMode removed.
- Clip generation file name suffix corrected.
- Animation Clip overwrite no longer breaks references in Unity 2023.1.
- Clip settings (foot IK, mirror, speed) reset to defaults on opening retarget window.
- Character prefab generation no longer breaks references. (Except 2023.1.1-5 due to Unity bugs)
- Rogue usings removed from code.
- Animation processing fixes.
- Correct character prefab used to retarget _motion.fbx files.
- Animation Clip overwrite no longer breaks references in Unity 2023.1.

### 1.5.1
- Character Build no longer creates and adds a default animation controller due to bugs in Unity 2022/2023 causing memory leaks when applying animation controllers to prefabs.
- Instalod and other renamed object/material name matching improvements.
Expand Down
25 changes: 19 additions & 6 deletions Editor/AnimRetargetGUI.cs
Original file line number Diff line number Diff line change
Expand Up @@ -613,6 +613,19 @@ static void OffsetALL()
ApplyPose(handPose);
}

static void SetEditorCurves(AnimationClip clip, List<EditorCurveBinding> bindings, List<AnimationCurve> curves)
{
#if UNITY_2020_3_OR_NEWER
AnimationUtility.SetEditorCurves(clip, bindings.ToArray(), curves.ToArray());
#else
int numClips = bindings.Count;
for (int i = 0; i < numClips; i++)
{
AnimationUtility.SetEditorCurve(clip, bindings[i], curves[i]);
}
#endif
}

static void OffsetShoulders()
{
if (!(OriginalClip && WorkingClip)) return;
Expand Down Expand Up @@ -699,7 +712,7 @@ static void OffsetShoulders()
applicableCurves.Add(curve);
}
AnimationClip swapClip = AnimPlayerGUI.CloneClip(WorkingClip);
AnimationUtility.SetEditorCurves(swapClip, applicableBindings.ToArray(), applicableCurves.ToArray());
SetEditorCurves(swapClip, applicableBindings, applicableCurves);
AnimPlayerGUI.SelectOverrideAnimationWithoutReset(swapClip, AnimPlayerGUI.animatorOverrideController);
AnimPlayerGUI.UpdateAnimator();
}
Expand Down Expand Up @@ -774,7 +787,7 @@ static void OffsetArms()
applicableCurves.Add(curve);
}
AnimationClip swapClip = AnimPlayerGUI.CloneClip(WorkingClip);
AnimationUtility.SetEditorCurves(swapClip, applicableBindings.ToArray(), applicableCurves.ToArray());
SetEditorCurves(swapClip, applicableBindings, applicableCurves);
AnimPlayerGUI.SelectOverrideAnimationWithoutReset(swapClip, AnimPlayerGUI.animatorOverrideController);
AnimPlayerGUI.UpdateAnimator();
}
Expand Down Expand Up @@ -835,7 +848,7 @@ static void OffsetArmsFB()
applicableCurves.Add(curve);
}
AnimationClip swapClip = AnimPlayerGUI.CloneClip(WorkingClip);
AnimationUtility.SetEditorCurves(swapClip, applicableBindings.ToArray(), applicableCurves.ToArray());
SetEditorCurves(swapClip, applicableBindings, applicableCurves);
AnimPlayerGUI.SelectOverrideAnimationWithoutReset(swapClip, AnimPlayerGUI.animatorOverrideController);
AnimPlayerGUI.UpdateAnimator();
}
Expand Down Expand Up @@ -904,7 +917,7 @@ static void OffsetLegs()
applicableCurves.Add(curve);
}
AnimationClip swapClip = AnimPlayerGUI.CloneClip(WorkingClip);
AnimationUtility.SetEditorCurves(swapClip, applicableBindings.ToArray(), applicableCurves.ToArray());
SetEditorCurves(swapClip, applicableBindings, applicableCurves);
AnimPlayerGUI.SelectOverrideAnimationWithoutReset(swapClip, AnimPlayerGUI.animatorOverrideController);
AnimPlayerGUI.UpdateAnimator();
}
Expand Down Expand Up @@ -973,7 +986,7 @@ static void OffsetHeel()
applicableCurves.Add(curve);
}
AnimationClip swapClip = AnimPlayerGUI.CloneClip(WorkingClip);
AnimationUtility.SetEditorCurves(swapClip, applicableBindings.ToArray(), applicableCurves.ToArray());
SetEditorCurves(swapClip, applicableBindings, applicableCurves);
AnimPlayerGUI.SelectOverrideAnimationWithoutReset(swapClip, AnimPlayerGUI.animatorOverrideController);
AnimPlayerGUI.UpdateAnimator();
}
Expand Down Expand Up @@ -1005,7 +1018,7 @@ static void OffsetHeight()
applicableCurves.Add(curve);
}
AnimationClip swapClip = AnimPlayerGUI.CloneClip(WorkingClip);
AnimationUtility.SetEditorCurves(swapClip, applicableBindings.ToArray(), applicableCurves.ToArray());
SetEditorCurves(swapClip, applicableBindings, applicableCurves);
AnimPlayerGUI.SelectOverrideAnimationWithoutReset(swapClip, AnimPlayerGUI.animatorOverrideController);
AnimPlayerGUI.UpdateAnimator();
}
Expand Down

0 comments on commit dee6557

Please sign in to comment.