Highlighted

get specific sequence with qe dom, extendscript

Explorer ,
Jul 25, 2020

Copy link to clipboard

Copied

Is there a way to get a specific sequence with the qe dom rather than just the active sequence? 

app.enableQE();
var seq = qe.project.getActiveSequence();
Then you will have access to: addTracks()

the problem here is im not trying to get the active sequence
 
I am trying to get sequence by a specific ID
 
This fails:

 

	for (var i = 0; i < qe.project.sequences.numSequences; i++) {
			var seq = qe.project.sequences[i];
			if (seq.sequenceID === newSeqID){
				var newSeq = seq;
			} 
		}



This works:

	for (var i = 0; i < app.project.sequences.numSequences; i++) {
			var seq = app.project.sequences[i];
			if (seq.sequenceID === newSeqID){
				var newSeq = seq;
			} 
		}​



my goal is to get the sequence using qeDOM so I can addTracks specified here:

https://community.adobe.com/t5/premiere-pro/add-a-track-in-a-sequence-extendscript/m-p/11313647?page...


I made a seperate post here just in case some one else had the same question they can find it easier let me know if I should take it down 🙂 


QE DOM remains, officially, unsupported.

I think you may have better luck trying to find a QE DOM sequence based on its .guid member...

 

app.enableQE();
var newSeq = qe.project.getActiveSequence();
var newSeqID = newSeq.guid;

for (var i = 0; i < qe.project.numSequences; i++) {
	var seq = qe.project.getSequenceAt(i);
	if (seq.guid === newSeqID){
		var newSeq = seq;
	} 
}​
TOPICS
Editing, Error or problem, How to, SDK

Views

111

Likes

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

get specific sequence with qe dom, extendscript

Explorer ,
Jul 25, 2020

Copy link to clipboard

Copied

Is there a way to get a specific sequence with the qe dom rather than just the active sequence? 

app.enableQE();
var seq = qe.project.getActiveSequence();
Then you will have access to: addTracks()

the problem here is im not trying to get the active sequence
 
I am trying to get sequence by a specific ID
 
This fails:

 

	for (var i = 0; i < qe.project.sequences.numSequences; i++) {
			var seq = qe.project.sequences[i];
			if (seq.sequenceID === newSeqID){
				var newSeq = seq;
			} 
		}



This works:

	for (var i = 0; i < app.project.sequences.numSequences; i++) {
			var seq = app.project.sequences[i];
			if (seq.sequenceID === newSeqID){
				var newSeq = seq;
			} 
		}​



my goal is to get the sequence using qeDOM so I can addTracks specified here:

https://community.adobe.com/t5/premiere-pro/add-a-track-in-a-sequence-extendscript/m-p/11313647?page...


I made a seperate post here just in case some one else had the same question they can find it easier let me know if I should take it down 🙂 


QE DOM remains, officially, unsupported.

I think you may have better luck trying to find a QE DOM sequence based on its .guid member...

 

app.enableQE();
var newSeq = qe.project.getActiveSequence();
var newSeqID = newSeq.guid;

for (var i = 0; i < qe.project.numSequences; i++) {
	var seq = qe.project.getSequenceAt(i);
	if (seq.guid === newSeqID){
		var newSeq = seq;
	} 
}​
TOPICS
Editing, Error or problem, How to, SDK

Views

112

Likes

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
Jul 25, 2020 0
Adobe Employee ,
Jul 27, 2020

Copy link to clipboard

Copied

QE DOM remains, officially, unsupported.

I think you may have better luck trying to find a QE DOM sequence based on its .guid member...

 

app.enableQE();
var newSeq = qe.project.getActiveSequence();
var newSeqID = newSeq.guid;

for (var i = 0; i < qe.project.numSequences; i++) {
	var seq = qe.project.getSequenceAt(i);
	if (seq.guid === newSeqID){
		var newSeq = seq;
	} 
}​

Likes

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
Reply
Loading...
Jul 27, 2020 2
Explorer ,
Jul 27, 2020

Copy link to clipboard

Copied

Thanks so much for the response! I am truly grateful. 

I create a new sequence using :

qe.project.newSequence(seqName, presetPath);
my goal is to retreive the newly created qe dom sequence object.
 
I tried :

var newSeq = qe.project.newSequence(seqName, presetPath);
 
but newSeq returns true boolean not the actual sequence object 
 
so I thought I could perhaps retreive the sequence based on the seqName string? 

Is there any better way I feel like I am close but I cant figure it out 

 

		app.enableQE();

		var seqName = 'test_sequence_new';

		// qe dom to add new sequence with pre-defined preset 
		qe.project.newSequence(seqName, presetPath);

		
		var originalSeq = $._PPP_.getSequenceByID(originalSeqID);

		// get new qe dom sequence by name 
		for (var i = 0; i < qe.project.numSequences; i++) {
			var seq = qe.project.getSequenceAt(i);
			if (seq.name === seqName){
				var newSeq = seq;
			} 
		}

 





Likes

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
Reply
Loading...
Jul 27, 2020 0
Adobe Employee ,
Jul 28, 2020

Copy link to clipboard

Copied

Again, QE DOM will remain officially unsupported...

 

I suspect that your new sequence will be the last sequence;  qe.project.numSequences - 1.

Likes

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
Reply
Loading...
Jul 28, 2020 0
Explorer ,
Jul 28, 2020

Copy link to clipboard

Copied

You sir are brilliant. 

One note - when I do

var seq = qe.project.getSequenceAt(qe.project.numSequences - 1);

 

I get evalscript Error 


when I do

 

var seq = qe.project.getSequenceAt(qe.project.numSequences - 2);

 

it returns the latest created sequence successfully. 

Is there an alternative way other than QE DOM to add tracks to a newly created sequence? Since QE DOM is unsupported?

I use  
qe.project.newSequence(seqName, presetPath); 

to create a new sequence, an alternative of using  
seq.addTracks(0), I was thinking of changing the actual PProPanel.sqpreset file that I use in presetPath parameter. 

 

Using the preset file it creates 3 video tracks, but I may need a variable  N number of video tracks. 


in PProPanel.sqpreset I noticed 

<VideoTracks>[]</VideoTracks>
 
so I tried to do : 

<VideoTracks>[10]</VideoTracks>
 
but this gave evalScriptError. 

Any other way to add tracks using PProPanel.sqpreset? 

this is what my file looks like:
 
 
I followed this guide for the createSequenceFromPreset function:
https://github.com/Adobe-CEP/Samples/blob/master/PProPanel/jsx/PPRO/Premiere.jsx
 
Reference to adding tracks:
 
 
 
 

 




Likes

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
Reply
Loading...
Jul 28, 2020 0