Add AacFlClip.BlendShape() overload

This commit is contained in:
suzuryg
2023-10-02 07:00:19 +02:00
committed by Haï~
parent b1e2ff3316
commit 2166a8e0d8
@@ -78,6 +78,15 @@ namespace AnimatorAsCode.V1
return this; return this;
} }
public AacFlClip BlendShape(SkinnedMeshRenderer renderer, string blendShapeName, AnimationCurve animationCurve)
{
var binding = AacV0.Binding(_component, typeof(SkinnedMeshRenderer), renderer.transform, $"blendShape.{blendShapeName}");
AnimationUtility.SetEditorCurve(Clip, binding, animationCurve);
return this;
}
public AacFlClip Scaling(GameObject[] gameObjectsWithNulls, Vector3 scale) public AacFlClip Scaling(GameObject[] gameObjectsWithNulls, Vector3 scale)
{ {
var defensiveObjects = gameObjectsWithNulls.Where(o => o != null); // Allow users to remove an item in the middle of the array var defensiveObjects = gameObjectsWithNulls.Where(o => o != null); // Allow users to remove an item in the middle of the array