Notifications
Clear all

[Closed] Delete Key > Zero Pos XYZ

Hi everyone,

In Max 8 if you create a key, you can right click on that key and delete either position, rotation, or scale. Does anyone know the MaxScript for deleting the keys for “Zero Pos XYZ” and “Zero Euler XYZ” for a given key?

Thanks for reading.

regard,
Mike

2 Replies
1 Reply
(@rustyknight)
Joined: 11 months ago

Posts: 0

Okay, so the docs say

[left][b][b]deleteKeys[/b][/b] <controller> [  [b][b]#allKeys [/b][/b]| [b][b]#selection[/b][/b] ]

Deletes keys from the controller according to the optional symbolic argument supplied.
[/left]
[left] #allKeys (default): deletes all keys in the controller.
[/left]
[left] #selection: deletes the currently selected keys
Sounds reasonable.

Now, we know we can access the controller information for a given node via the node.[property].controller property

So if take a leap of logic (or anti-logic depending on how your day is going), we should be able to do something like this:

deleteKeys myNode.rotation.controller #selection

This should remove all the selected keys on the rotation controller for the given object (in this case a pointer to the variable myNode).

You should also check out deleteKeys <controller> <index>

Shane
[/left]

Thanks Shane. I’ll look into that.