-
inspecting the type of key interpolation
Just wanted to check, there’s no way in expressions to determine the type of a specified key, is there?
For example:
//
// Designed to go in a sourceText property as a debugger
//
p = transform.position;n = 0;
if (p.numKeys > 0) {
n = p.nearestKey(time).index;
if (time < p.key(n).time ) {
// key n is ahead of us
n--;
}
}if (p.numKeys > n && n > 0) {
// there's at least one key after this one, and we're not before the first keyq = p.key(n).typeOf;
if (q == 'linear') {
// do something
}if (q == 'bezier') {
// do something else
}
} else {
// outside the current range of keys
}