Skip to main content
Inspiring
March 26, 2025
Answered

Time remapping a layer through script.

  • March 26, 2025
  • 1 reply
  • 518 views
// Enable and configure time remapping
                layer21.timeRemapEnabled.setValue(true);
                var timeRemap = layer21.property("ADBE Time Remapping");
				if (!timeRemap) throw new Error("Time Remapping property not available on Layer 21");
Correct answer threedeeNYC

thank you dan. I was able to get the time remapping to work .Now for some reason i cannot add values at times.

layer21.timeRemapEnabled=true;
var timeRemap = layer21.property("ADBE Time Remapping");
var frameRate = targetComp3.frameRate;
var timeAtFrame5 = 5 / frameRate;
var timeAtFrame70 = 70 / frameRate;

timeRemap.setValueAtTime(timeAtFrame5, 84);

 The script above adds a keyframe at 5, but doesnt assign it the value 84 


SOLVED - Needed to divide 84 by the frame rate as well. since 1 is equal to 30 frames.

1 reply

Inspiring
March 26, 2025

i also had layer21.timeRemapEnabled = true;

Dan Ebberts
Community Expert
Community Expert
March 26, 2025

I'm not sure what you're question is, but maybe like this:

if (layer21.canSetTimeRemapEnabled){
	layer21.timeRemapEnabled = true;
}
threedeeNYCAuthorCorrect answer
Inspiring
March 26, 2025

thank you dan. I was able to get the time remapping to work .Now for some reason i cannot add values at times.

layer21.timeRemapEnabled=true;
var timeRemap = layer21.property("ADBE Time Remapping");
var frameRate = targetComp3.frameRate;
var timeAtFrame5 = 5 / frameRate;
var timeAtFrame70 = 70 / frameRate;

timeRemap.setValueAtTime(timeAtFrame5, 84);

 The script above adds a keyframe at 5, but doesnt assign it the value 84 


SOLVED - Needed to divide 84 by the frame rate as well. since 1 is equal to 30 frames.