Skip to content
Advertisement

Any way to set multiple keys and values at once in Maya using python?

I’m looking for a solution, that allows to set list of values

JavaScript

over given list of times

JavaScript

at once, without loop, like this:

JavaScript

There are commands

JavaScript

and

JavaScript

that allow to set animation keys at a given time But non of them allow to set range of value over the range of time (frames).

The same value can be put on the time range, but that’s not the case.

JavaScript

I tried to get attributes of the animation curve node, that stores keys inside, but got an empty output.

JavaScript

Advertisement

Answer

Latest approach does not work in 2019 Maya. For those who will stumble upon, here is the proper code.

JavaScript
Advertisement