• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Snapping all keysframes to a full frame

Community Beginner ,
Jan 24, 2024 Jan 24, 2024

Copy link to clipboard

Copied

So....

 

I  wasn't paying attention to a comps settings and did a whole bunch of animation in a comp thats 27.97 fps as opposed to a 24 fps. When I set it back to 24 fps the keys all end up on half key frames and its a bit of a mess. Is there anyway to select the lot and have them all pop to the nearest frame?

 

I had a quick google around and found asu_NudgeKeyFrames_selectedlayersonly.jsx

but I'm guessing it could be old as doenst seem to be working with the latest version of ae.

 

Any help would be greatfully appriciated, thanks 

TOPICS
How to , User interface or workspaces

Views

360

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Advocate ,
Jan 24, 2024 Jan 24, 2024

Copy link to clipboard

Copied

Try this, you can select multiple properties at once:

 

AdjustKeyframesToComposition.jsx

 

var proj = app.project;
var thisComp = proj.activeItem;
var props = thisComp.selectedProperties;
if (!props.length) {
  alert('Please select at least 1 property.');
} else {
  app.beginUndoGroup("undo");

  for (var propIndex = 0; propIndex < props.length; propIndex++) {
    var prop = props[propIndex];
    for (var keyIndex = 1; keyIndex <= prop.numKeys; keyIndex++) {
      var v = prop.keyValue(keyIndex);
      var t = Math.floor(thisComp.frameRate * prop.keyTime(keyIndex)) / thisComp.frameRate;
      prop.removeKey(keyIndex);
      prop.setValueAtTime(t, v);
    }
  }
  app.endUndoGroup();
}

 

 

screenshot.png

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 24, 2024 Jan 24, 2024

Copy link to clipboard

Copied

Keyframes are always based on time. When you change the frame rate, they may not line up with the start of a frame, but the change in value will still happen at the same time, rounded to the nearest frame. Snapping a keyframe to the start of a frame will not change the animation's timing or appearance. The only thing that will change is the position of the keyframe relative to the start of the frame. Snapping every keyframe will not change the rendered movie's timing or look. In my opinion, it's a waste of time. 

 

Movies that were shot on film at 24 fps and broadcasted at 29.97 fps still look like movies instead of videos.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Beginner ,
Jan 25, 2024 Jan 25, 2024

Copy link to clipboard

Copied

Thanks guys! I will check out that script.

@Rick Gerard  basically the 29.97 fps comp is a character comp nested in the main comp which is 24fps.

The character comp is showing strange glicthes when previewed within the master comp. Those glitches are not present when previewing directly in the character comp. When I nest the character comp in a 29.97 fps comp then its fine, no glitches.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Nov 16, 2024 Nov 16, 2024

Copy link to clipboard

Copied

LATEST

Hey, I agree with Rick, snapping keyframes to the nearest frame is usually not needed. However, if you have a bunch of keyframes and some are set to linear and some to hold, and the hold ones are not snapped to the frame, you might get weird results if motion motion blur in on. That's a pretty specific case but i now have to move around 50 keyframe manually, it would be usefull to have a native ae command to do it:)

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines