Results 1 to 5 of 5

Thread: Please help me!

  1. #1

    Please help me!

    Exists a way to delete from action Location and scale?
    i have many animations and i need to keep only rotation keyframes..
    thanks



  2. #2
    Member
    Join Date
    May 2008
    Location
    Arlington, VA
    Posts
    1,015
    Originally Posted by KaoZ View Post
    Exists a way to delete from action Location and scale?
    i have many animations and i need to keep only rotation keyframes..
    thanks
    This should work, but it will affect all of the actions in your scene.
    Code:
    import bpyfor a in bpy.data.actions:
        
        removeThese = []
        for f in a.fcurves:
            
            if f.data_path.endswith(('location', 'rotation_quaternion')):
                removeThese.append(f)
        
        for r in removeThese:
            a.fcurves.remove(r)
    There is no greater ignorance then the refusal to learn.



  3. #3
    Hi Krisnack thanks for your reply but it gives me this error:
    http://prntscr.com/iel2a4



  4. #4
    Member Secrop's Avatar
    Join Date
    Dec 2011
    Location
    Berlin
    Posts
    2,010
    it's a small identation error...
    it should be:
    Code:
    import bpy
    
    for a in bpy.data.actions:
    (....)



  5. #5
    Thank you very much now works! but it keeps the scale .. i would like to keep only Rotation
    thanks again!

    i did .. i just replaced rotation with scale and now is perfect!

    bad that i can't use just in some actions .. but is already a great thing!!
    thanks!!
    Last edited by KaoZ; 14-Feb-18 at 08:54.



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •