Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import bpy
- context = bpy.context
- ob = context.object
- ad = ob.animation_data
- if ad:
- action = ad.action
- if action:
- remove_types = ["location", "scale", "rotation"]
- # select all that have datapath above
- fcurves = [fc for fc in action.fcurves
- for type in remove_types
- if fc.data_path.startswith(type)
- ]
- # remove fcurves
- while(fcurves):
- fc = fcurves.pop()
- action.fcurves.remove(fc)
- fcurves = [fc for fc in action.fcurves
- for type in remove_types
- if fc.data_path.startswith(type)
- and fc.array_index == 1
- ]
Add Comment
Please, Sign In to add comment