Notifications
Clear all

[Closed] How to get and delete $bip01 numKeys?

Only $bip01 is incorrect,Other bips are correct.
How to delete $bip01 numKeys?
thanks!

samples:

for obj in selection do
(
ctrl = obj.controller
selAllKeys = selectKeys ctrl
count = numKeys ctrl
str = obj.name + ” keys = “
print (str + (count as string))
while count > 0 do
(
deleteKey ctrl count
count = count – 1
)
)

output :

“Bip01 keys = -1”
“Bip01 Head keys = 2”
“Bip01 L Calf keys = 1”
“Bip01 L Clavicle keys = 3”
“Bip01 L Finger0 keys = 3”
“Bip01 L Finger01 keys = 3”
“Bip01 L Finger1 keys = 3”
“Bip01 L Finger2 keys = 3”
“Bip01 L Finger11 keys = 3”
“Bip01 L Finger21 keys = 3”

Biped Vertical_Horizontal_Turn(Body):Matrix3 Controller

3 Replies
1 Reply
(@denist)
Joined: 11 months ago

Posts: 0

for every biped controller you can use biped.deleteKeys <biped_controller> #allKeys method. It deletes all keys in biped controller. Body controller has three separate controllers: Horizontal, Vertical, and Turn. If you want to delete all keys of Body controller you have to delete all keys for all those three (sub) controllers.

This is quick and dirty:

bip = $bip01.transform.controller

vk = biped.getkey bip.vertical.controller 1 (key number)

hk = biped.getkey bip.horizontal.controller 1 (key number)

rk = biped.getkey bip.turning.controller 1 (key number)

vk.selected = true
hk.selected = true
rk.seelcted = true

biped.deletekeys bip #selection

Most of this can be found in 2 places, search for “biped keys” and “keys” in the maxscript help file

Thank you very much denisT and animation23!

bip = $bip01.transform.controller
biped.deleteKeys bip.vertical.controller #allKeys

My script ready to work!