[python] Some issues working with keyframes

   969   0   1
User Avatar
Member
253 posts
Joined: July 2013
Offline
I'd like to store some persistent data on parm's keyframes and there is no ‘official’ way of adding meta data to them so I figured I'd abused the expression for it, like so:

bezier() + 0 *(1 + 2 + 3 + 4)

A bit hackish but it has no influence on the keyframe's behavior and I can get the expression string and parse the 1,2,3 and 4 out of it for later use.

So far so good.. but I'm workings with selected keys in the animation editor which loses the selection when you use the setExpression() method from a keyframe (only when it actually changes value, so when setting an expression to ‘bezier()’ that already is ‘bezier()’ the selection will stick)

So I thought, what ever I'll just store the selection and re-select them again after setting the expressions. But there is no way to do that afaik.


So in short:
-It would be great it we could add custom persistent metadata to keyframes (I've put in a RFE for it)
-Make keyframe selection stick when changing it's expression through python
-Ability to select keyframes in animation editor/playbar using python.

If anyone knows a better way using existing functions to do this I'd love to know!
More code, less clicks.
  • Quick Links