Fixing keyframes
Copy link to clipboard
Copied
Hi,
I've written an effect (layer effect) which performs different actions in a specific order.
If this order is respected, everything's fine.
The problems come when the user drags the keyframes in the timeline (so when their time change...).
I've tried to save the keyframes times when keys are set and compare them with actual keytimes, but if user drags them fast enough, the render is called anyway...
So here's my question: is there any way to fix the keyframes in time?
If not, is there a way to hide (or disable) the keyframes in the timeline, but not in the Effect's UI?
Thanx,
François
Copy link to clipboard
Copied
well... there are a few shennanigans you can do... but that would mess with the user's head.
for example, AEGPs have an UpdateMenuHook, which is called at various times, including when the selection changes.
this way you can either monitor changes made to keyframes, or make your keyframes "unselectable" (but unselecting them during that call), thus driving your user insane.
i didn't get the keyframe moving too fast thing.
when you get a render call can you not know what keyframe went where?
or are you trying to prevent the render?
i didn't get exactly what behaviour your describing.
Copy link to clipboard
Copied
Hi Shachar!
Thanx for the answer.
The "unselectable" keys is a trick I've been trying before, but it brings strange behaviour, like if you stay clicked on a key, and your plugin deselects it, a new selection comes up with the key again.
And if you move, the move itself is repeated as many times as the key is selected / unselected... and the key moves like crazy.
But I think I've seen where the problem comes from:
when keys are dragged, there is a difference (in certain cases, like dragging keys fast with a slow render) between params[]->u.something.value and the corresponding stream.
I've changed my code and it works fine now...
But it was really tricky to debug: if you drag keys under debug mode, AE takes the time to update params[] values, and the error doesn't appear.
Cheers,
François
Copy link to clipboard
Copied
as long as you got it solved, it's all good.
at least now we know that difference in AE's behaviour between debug and
release.

