Deleting animation curve with editor script

I duplicated animation. I can delete it using animation editor, but i need to delete a lot of animations, so i need a script. I have this one, but it doesn't work((( Code:

using UnityEngine; 
using UnityEditor; 
using System; 

public class FixAnimation : ScriptableObject 
{ 
    [MenuItem("Custom/FixAnimation")] 
    static void ListChildTransforms() 
    { 

        GameObject go = Selection.activeGameObject; 

        string parent_name = go.name; 

        AnimationClip anim=go.animation["jumpc"].clip; 

        //Hip 

        anim.SetCurve("Player/Armature/Master/Ass/Hip", typeof(Transform), "m_localPosition.x", null); 

        anim.SetCurve("Player/Armature/Master/Ass/Hip", typeof(Transform), "m_localPosition.y", null); 

        anim.SetCurve("Player/Armature/Master/Ass/Hip", typeof(Transform), "m_localPosition.z", null); 

     } 

}

It can be compiled, but it doesnt delete animation curves. Help me, please!!!!!!

First of all, you are using wrong property names.

Look at the documentation:

http://unity3d.com/support/documentation/ScriptReference/AnimationClip.SetCurve.html

It states that you can use `localPosition.x`, not `m_localPosition.x`. Note that `m_LocalPosition.x` is undocumented but should also work (no guarantee for future versions); however, notice the upper case L.

If you fix the property names themselves, and it still doesn't do anything, check that your path names are correct.

The path "Player/Armature/Master/Ass/Hip" will look for a child called "Player" and go down from there, so this should work if the Animation component is on the parent of "Player", but not if the Animation component is on the "Player" GameObject itself.