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

Time remapping a layer through script.

Explorer ,
Mar 26, 2025 Mar 26, 2025
// 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");
TOPICS
Scripting
409
Translate
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

correct answers 1 Correct answer

Explorer , Mar 26, 2025 Mar 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

...
Translate
Explorer ,
Mar 26, 2025 Mar 26, 2025

i also had layer21.timeRemapEnabled = true;

Translate
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 ,
Mar 26, 2025 Mar 26, 2025

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

if (layer21.canSetTimeRemapEnabled){
	layer21.timeRemapEnabled = true;
}
Translate
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 ,
Mar 26, 2025 Mar 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.

Translate
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 ,
Mar 26, 2025 Mar 26, 2025
LATEST

Glad to hear it. I was about to ask you if your comp was at least 84 seconds long.

Translate
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