Hi @thepetercoin,
This is an annoying problem with keyframes.
A while ago, I attempted to address this issue with an action called “snap to framerate” but it doesn’t really work correctly in every situation so its unreliable and needs to be fixed.
Actually there is “all” in Automation Toolkit, you can loop over all the layer properties and change only the properties with keyframes, so you don’t need to select custom properties ahead.
I usually strive to respond quickly and provide a detailed solution. However, this automation process is very tricky because it required a lot of trial and error to find the right solution for this problem. While it may sound simple, it’s essential to consider how to move the keyframes without overwriting others and determine the best approach to maintain timing.
Additionally, I had to find workarounds for issues with After Effects, which meant incorporating additional code into the automation to create an effective solution.
I created 2 versions for quantize the keyframes:
Quantize keyframes push forward -
This automation moves forward each keyframe that is in between frames to the closet next frame.
it will also push/offset the rest of the keyframes by the amount it moved each keyframe.
Pros:
- The offset will preserve the original distance between the keyframes, helping to maintain the timing of the original animations.
Cons:
- The offset will cause the last keyframes to become out of sync relative to the composition.
Download -
Quantize keyframes push forward.zip (3.4 KB)
Quantize keyframes squash forward -
This automation moves forward each keyframe that is in between frames to the closet next frame.
it will push/offset the rest of the keyframes only if it cant move a keyframe forward without overwriting another keyframe.
Pros:
- The offset will preserve the timing of keyframes relative to the composition, and it will try not to change the duration of the animation.
Cons:
- The original distance between the keyframes might be shortened, which can change the timing of the original animations to appear faster.
Download -
Quantize keyframes squash forward.zip (3.4 KB)
I think that in most cases, I would prefer the ‘Quantize keyframes squash forward’ option, but I can imagine some cases where ‘Quantize keyframes push forward’ would be better.
Currently it works only on the active comp but it can be run on multiple comps at once easily.
Please let me know if you have questions, and if it fixed your problem.