Skip to content

Commit c027e2d

Browse files
committed
remove keytangents test
- was using deprecated code and would need a lot of refactoring as the keyframes are not enough to get the tangents anymore
1 parent 296b52e commit c027e2d

File tree

1 file changed

+0
-51
lines changed

1 file changed

+0
-51
lines changed

Assets/com.unity.formats.fbx/EditorTests/FbxAnimationTest.cs

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -303,33 +303,6 @@ public virtual int Compare(Keyframe a, Keyframe b)
303303
}
304304
}
305305

306-
public class KeyTangentComparer : IComparer<Keyframe>
307-
{
308-
public int CompareKeyTangents(Keyframe a, Keyframe b)
309-
{
310-
bool result = true;
311-
312-
result &= a.time.Equals(b.time);
313-
#if DEBUG_UNITTEST
314-
Debug.Log(string.Format("{2} a.time: {0}, b.time: {1}", a.time, b.time,result));
315-
#endif
316-
// TODO : use AnimationUtility.GetLeftTangentMode
317-
// requires reference to AnimationCurve and keyindex
318-
result &= (a.tangentMode == b.tangentMode);
319-
#if DEBUG_UNITTEST
320-
Debug.Log(string.Format("{2} a.tangentMode={0} b.tangentMode={1}",
321-
((AnimationUtility.TangentMode)a.tangentMode).ToString(),
322-
((AnimationUtility.TangentMode)b.tangentMode).ToString(),result));
323-
#endif
324-
return result ? 0 : 1;
325-
}
326-
327-
public int Compare(Keyframe a, Keyframe b)
328-
{
329-
return CompareKeyTangents(a,b);
330-
}
331-
}
332-
333306
public class AnimTester
334307
{
335308
public FbxAnimationTest.KeyData keyData;
@@ -752,30 +725,6 @@ public int ContinuousRotationAnimTest (RotationCurveType rotCurveType, float []
752725
return tester.DoIt();
753726
}
754727

755-
[Description("Uni-35935 key tangents")]
756-
[Test, TestCaseSource (typeof (AnimationTestDataClass), "KeyTangentsTestCases")]
757-
public int KeyTangentsAnimTest (float [] keyTimesInSeconds, Vector3 [] keyPosValues, Vector3 [] keyRotValues)
758-
{
759-
System.Type componentType = typeof(Transform);
760-
761-
if (keyRotValues == null)
762-
{
763-
keyRotValues = new Vector3[keyPosValues.Length];
764-
}
765-
766-
string[] propertyNames = null;
767-
string testName = componentType.ToString () + "_KeyTangents";
768-
RotationCurveType rotCurveType = RotationCurveType.kEuler;
769-
770-
testName += "_Euler";
771-
propertyNames = AnimationTestDataClass.m_rotationEulerNames.Concat(AnimationTestDataClass.m_translationNames).ToArray();
772-
773-
KeyData keyData = new TransformKeyData { RotationType = rotCurveType, propertyNames = propertyNames, componentType = componentType, keyTimes = keyTimesInSeconds, keyPosValues = keyPosValues, keyEulerValues = keyRotValues };
774-
775-
var tester = new AnimTester {keyData=keyData, testName=testName, path=GetRandomFbxFilePath (), keyComparer=new KeyTangentComparer()};
776-
return tester.DoIt();
777-
}
778-
779728
[Test, TestCaseSource (typeof (AnimationTestDataClass), "ComponentTestCases")]
780729
public int ComponentAnimTest (System.Type componentType)
781730
{

0 commit comments

Comments
 (0)