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

Premiere Pro Scripting: How to add Transition to Clip?

Explorer ,
Aug 11, 2021 Aug 11, 2021

Copy link to clipboard

Copied

Hi guys,

 
I've browsed through many Youtube tutorials, documentations, and online forums, but I don't think I've seen one where it shows how to add video transitions to clips on a track, using a script.
 
I know there is an "addTransition" method for clips in QE, but I can't figure out what the arguments should be.
 
Here is what I have found out so far:
 
In ExtendScript, we can view an object's properties and methods using the Reflection object, as documented here: https://extendscript.docsforadobe.dev/extendscript-tools-features/extendscript-reflection-interface....
 
So I've used it for a qeClip i.e.  

 

 

var qe = app.enableQE();

var qeProject = qe.project;

var qeSequence = qeProject.getActiveSequence();

var qeTrack = qeSequence.getVideoTrackAt(0);

var qeClip = qeTrack.getItemAt(1);

 

 

 
Testing: 

 

 

var qeClipName = qeTrack.getItemAt(1).name;
$.writeln(qeClipName);

 

 

 
Gives:

 

 

a-vid-B085TC6KG7_1.mp4

 

 

which is the correct name of the clip.
 
So:

 

 

var clipMethods = qeClip.reflect.methods;

 

 

gives:

 

 

addAudioEffect,addTransition,addVideoEffect,canDoMulticam,getClipPanComponent,getComponentAt,getProjectItem,move,moveToTrack,remove,removeEffects,rippleDelete,roll,setAntiAliasQuality,setBorderColor,setBorderWidth,setEndPercent,setEndPosition,setFrameBlend,setMulticam,setName,setReverse,setScaleToFrameSize,setSpeed,setStartPercent,setStartPosition,setSwitchSources,setTimeInterpolationType,slide,slip

 

 

 
In the list above, I have identified the "addTransition" method at index 1.
 
Testing:

 

 

var addTransition = qeClip.reflect.methods[1];
$.writeln(addTransition);

 

 

 
Gives:

 

 

addTransition

 

 

 
So now I would like to see what are the arguments for this "addTransition" method.
Per above documentation: that's: 

 

 

obj.reflect.methods["indexOf"].arguments[0];​

 

 

 

So,

 

 

var arguments = addTransition.arguments;
$.writeln(arguments);

 

 

 
Funnily,.gives:

 

 

p0,,,,,,

 

 

 
Furthermore,

 

 

var arguments0 = addTransition.arguments[0];
$.writeln(arguments0);

 

 

 
outputs:

 

 

p0

 

 

 
and:
 

 

 

var arguments1 = addTransition.arguments[1];
$.writeln(arguments1);

 

 

 
gives:
Nothing.
and so does addTransition.arguments[2], 3, 4, up to addTransition.arguments[6].
 
What should these arguments be?
How can we script for addTransitions?
Any help is appreciated 🙂

 

Thanks,
Amin
TOPICS
SDK

Views

1.4K

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 2 Correct answers

Adobe Employee , Aug 12, 2021 Aug 12, 2021

QE DOM is unsupported, and not recommended. [I've reached out to Amin directly.]

Votes

Translate

Translate
Adobe Employee , Apr 04, 2024 Apr 04, 2024

As before: Undocumented, and unsupported.

Votes

Translate

Translate
Adobe Employee ,
Aug 12, 2021 Aug 12, 2021

Copy link to clipboard

Copied

QE DOM is unsupported, and not recommended. [I've reached out to Amin directly.]

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
Explorer ,
Aug 16, 2021 Aug 16, 2021

Copy link to clipboard

Copied

Thanks!

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
Engaged ,
Jan 29, 2024 Jan 29, 2024

Copy link to clipboard

Copied

I also am searching for the answer, can you send it to me @aminn75893596  ? (If you are still arround)

 

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
Explorer ,
Mar 31, 2024 Mar 31, 2024

Copy link to clipboard

Copied

Yeah. I am also pretty curious. @Bruce Bullis  some help on all the parameters of addTransition() would be awesome (although the  QE DOM is unsupported)

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
Explorer ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

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
Adobe Employee ,
Apr 04, 2024 Apr 04, 2024

Copy link to clipboard

Copied

LATEST

As before: Undocumented, and unsupported.

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 ,
Apr 27, 2023 Apr 27, 2023

Copy link to clipboard

Copied

var qe = app.enableQE();

var qeProject = qe.project;

var qeSequence = qeProject.getActiveSequence();

var qeTrack = qeSequence.getVideoTrackAt(0);

var qeClip = qeTrack.getItemAt(0);

qeClip.addTransition(qeProject.getVideoTransitionByName("Dip to Black"));

I noticed this will add "Dip to Black" between clip (0) and clip (1)

Phc296318953d9p_0-1682652352051.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