Notifications
Clear all
[Closed] Please Help
Page 1 / 2
Next
Aug 12, 2013 6:47 pm
5 keys to select the time interval
…
1-select keys (Number of key = variables)
2-deselect keys 0 5 10 15 20 …
3-delete keys
10 Replies
Aug 12, 2013 6:47 pm
not quite sure what you want to do, you want to delete every keys except the keys at 0 5 10 15 20 ?
Aug 12, 2013 6:47 pm
I want my keys to be deleted to 5 of 5 (The number of keys in the animation variable)
Sorry for my bad English language
Aug 12, 2013 6:47 pm
If you’re looking for a solution to delete keys except those multiple of 5, try this:
--select your object
for o in selection do
(
for x = 1 to 4 do
(
for y = (0f+x) to (100f+x) by 5f do --timeline from 0f to 100f.
(
-- Position keyframes
selectKeys o.pos.controller y
deletekeys o.pos.controller #selection
-- Rotation keyframes
selectKeys o.rotation.controller y
deletekeys o.rotation.controller #selection
-- Scale keyframes
selectKeys o.scale.controller y
deletekeys o.scale.controller #selection
)
x=x+1 --until x=4 , end of loop
)
)
Hope this helps.
Aug 12, 2013 6:47 pm
Ok, here you go:
Bip = for o in objects where classOf o == Biped_Object collect o
for x = 1 to 4 do
(
for y = (0f+x) to (100f+x) by 5f do
(
--Bip keys
for i = 2 to Bip.count - 1 do
(
biped.selectKeys Bip[i+1].controller y
biped.deleteKeys Bip[i+1].controller #selection
)
--Bip COM keys
biped.selectKeys Bip[1].transform.controller.vertical.controller y
biped.deleteKeys Bip[1].transform.controller.vertical.controller #selection
biped.selectKeys Bip[1].transform.controller.horizontal.controller y
biped.deleteKeys Bip[1].transform.controller.horizontal.controller #selection
biped.selectKeys Bip[1].transform.controller.turning.controller y
biped.deleteKeys Bip[1].transform.controller.turning.controller #selection
)
x=x+1
)
select bip
Aug 12, 2013 6:47 pm
I’m sorry.
This script does not work when there are two biped ?
selec bip = select name biped
Please help
Aug 12, 2013 6:47 pm
if you want to add a filtering by name too, change the first line
from:
Bip = for o in objects where classOf o == Biped_Object collect o
to:
Bip = for o in objects where matchPattern o.name pattern:"*Bip001*" AND classOf o == Biped_Object collect o
Page 1 / 2
Next