• 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

98

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
Engaged ,
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

LATEST

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