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

[Extenscript] exportCurrentFrameAsPNG - exports only the first frame of the sequence

New Here ,
Oct 26, 2020 Oct 26, 2020

Copy link to clipboard

Copied

I'm using the PPROPanel Extesion, Ihave an active sequence, then I'm selecting some frame(playing with the time line selection) and then click on 'Export sequence frame'.

I can see the new image file, but every image is the same - the first frame of the sequence regardless the sequence player position.

The same result received by clicking 'Export frames for markers' - all markers has the same image (the first frame of the sequence).

What amo I doing wrong?

thanks.

TOPICS
SDK

Views

517

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

correct answers 1 Correct answer

Adobe Employee , Oct 27, 2020 Oct 27, 2020

What am I doing wrong?

Trusting my example code. 🙂 

In order to create the output path, the sample code changes the timecode string; this means PPro can't understand it when exportFramePNG() is called, so PPro falls back to time 0.

The snippet below works correctly; I'll check it in soon. 

 

	exportCurrentFrameAsPNG : function () {
		app.enableQE();
		var activeSequence = qe.project.getActiveSequence(); // note: make sure a sequence is active in PPro UI
		if (activeSequence) {
			// Create a fil
...

Votes

Translate

Translate
Adobe Employee ,
Oct 27, 2020 Oct 27, 2020

Copy link to clipboard

Copied

What am I doing wrong?

Trusting my example code. 🙂 

In order to create the output path, the sample code changes the timecode string; this means PPro can't understand it when exportFramePNG() is called, so PPro falls back to time 0.

The snippet below works correctly; I'll check it in soon. 

 

	exportCurrentFrameAsPNG : function () {
		app.enableQE();
		var activeSequence = qe.project.getActiveSequence(); // note: make sure a sequence is active in PPro UI
		if (activeSequence) {
			// Create a file name, based on timecode of frame.
			var time = activeSequence.CTI.timecode; // CTI = Current Time Indicator.
			var removeThese = /:|;/ig; 				// Why? Because Windows chokes on colons in file names.
			var tidyTime = time.replace(removeThese, '_');
			var outputPath = new File("~/Desktop");
			var outputFileName = outputPath.fsName + $._PPP_.getSep() + tidyTime + '___' + activeSequence.name;
			activeSequence.exportFramePNG(time, outputFileName);
		} else {
			$._PPP_.updateEventPanel("No active sequence.");
		}
	},

 

 

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
New Here ,
Oct 27, 2020 Oct 27, 2020

Copy link to clipboard

Copied

LATEST

Thanks, works like a charm!

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