Message 1 of 6
Not applicable
12-05-2016
03:47 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
So naturally (And this confused me for 10 min why it was not working for me) I would just drop all my keys in a loop and delete:
for key in AKeys:
cmds.cutKey(index=(key, key))But when deleting a key it automatically indexes the next key into the deleted index, so I was preforming this:
DELETE [0]
[key 1 is now in index 0]
DELETE [2]
[key 3 is now in index 2]
etc...
So I was skipping every second index in my array. What my question is: How can I delete all these keys in my array that contains an assortment of random key indexes [10][11][12][15][16][22]...?
Can I do something like cmds.cutKey(index=(deleteKeys, len(deleteKeys)) or simmilar?
Is the only way to subtract 1 from my loop every time I remove an index?
Solved! Go to Solution.