how can i delete biped bone keys with pymxs

1374471911
Observer
Observer

how can i delete biped bone keys with pymxs

1374471911
Observer
Observer
def clear_bone_animation_data(bone, start_frame, end_frame😞
    for frame in range(start_frame, end_frame+1😞
        cotroller = rt.GetPropertyController(bone.controller, 'Position')
        rt.SelectKeys(cotroller, frame)
        rt.DeleteKeys(cotroller)
        #delete rotation keys
        cotroller = rt.GetPropertyController(bone.controller, 'Rotation')
        rt.SelectKeys(cotroller, frame)
        rt.DeleteKeys(cotroller)
 
for some bones, my script can work, but we i use it in biped bone,it not work
0 Likes
Reply
244 Views
1 Reply
Reply (1)

inquestudios
Enthusiast
Enthusiast

Biped uses its own animation controller system, so for biped bones you have to use 
biped.deleteKeys
https://help.autodesk.com/view/MAXDEV/2025/ENU/?guid=GUID-082B8EB1-B1A7-4D12-92D4-005A2CD899D6

and for tasks like this you actually don't need Python, use pure MAXscript

0 Likes