Toggle Set Key button?

Hi,

I'm applying transformations with code (a mix of msx and maxplus). This seems to offset existing animation on my objects, which is unfortunately not what I want. Enabling "set key" in the interface, get's around this behavior.

I can toggle "set key" with "max set key mode", but I also need to know it's state beforehand and I'm not sure how to get that. I'd also need "auto key" off during my operations and want to preserve it's state for the user.

Any pointers on this or an alternative way to manipulate transforms, without offsetting everything? Below is some "pseudo code", that uses a Python context

Thanks!
(Me==Über Max noob)

class SetKeyOn:
--"""Context that temporarily enables set key state"""
--def __enter__(self):
----self.key_state = get_setkey_state()
----set_setkey_state(True)
--def __exit__(self):
----set_setkey_state(self.key_state)

with SetKeyOn():
--with AutoKeyOff():
----"move stuff around, without offsetting animation or setting auto keys"

Comments

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
victorgilbert's picture

Thank you for Toggle Set Key.

Thank you for Toggle Set Key. I was looking for this and found this in this site. Thank you very much.

  • The great thing about online pokies microgaming is definitely the incontrovertible fact that each pokie game is rather special.
RigVader's picture

Well, reading the Python api

Well, reading the Python api docs some more proved helpful. The animation class offers the following methods:

MaxPlus.Animation.GetIsAnimating()
MaxPlus.Animation.SetIsAnimating()
MaxPlus.Animation.GetSetKeyMode()
MaxPlus.Animation.SetSetKeyMode()

http://docs.autodesk.com/3DSMAX/16/ENU/3ds-Max-Python-API-Documentation/...

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.