Search Unity

Can't I make BlendShape animation into animationClip?

Discussion in 'Animation' started by kk7250, Jun 1, 2020.

  1. kk7250

    kk7250

    Joined:
    Feb 26, 2020
    Posts:
    2
    Can't I make BlendShape animation into animationClip?
    Is there only a way to use SetBlendShapeWeight?

    I am trying to create a BlendShape AnimationClip using AnimationClip.SetCurve.
    But I have no information. I want to know what variables should go in ...



    <Below is a part of the code>

    GameObject o = GameObject.Find(mBlendShape.name);
    SkinnedMeshRenderer so = o.GetComponent<SkinnedMeshRenderer>();
    Mesh mo = so.sharedMesh;
    string primitiveObjPath = o.name + "/Primitive" + 1; // will be loaded only Primitive1
    mAnimationClip.SetCurve(primitiveObjPath, typeof(SkinnedMeshRenderer), mo.GetBlendShapeName(j), curve);
     
unityunity