Copy link to clipboard
Copied
Hi guys,
var qe = app.enableQE();
var qeProject = qe.project;
var qeSequence = qeProject.getActiveSequence();
var qeTrack = qeSequence.getVideoTrackAt(0);
var qeClip = qeTrack.getItemAt(1);
var qeClipName = qeTrack.getItemAt(1).name;
$.writeln(qeClipName);
a-vid-B085TC6KG7_1.mp4
var clipMethods = qeClip.reflect.methods;
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
var addTransition = qeClip.reflect.methods[1];
$.writeln(addTransition);
addTransition
obj.reflect.methods["indexOf"].arguments[0];​
var arguments = addTransition.arguments;
$.writeln(arguments);
p0,,,,,,
var arguments0 = addTransition.arguments[0];
$.writeln(arguments0);
p0
var arguments1 = addTransition.arguments[1];
$.writeln(arguments1);
QE DOM is unsupported, and not recommended. [I've reached out to Amin directly.]
As before: Undocumented, and unsupported.
Copy link to clipboard
Copied
QE DOM is unsupported, and not recommended. [I've reached out to Amin directly.]
Copy link to clipboard
Copied
Thanks!
Copy link to clipboard
Copied
I also am searching for the answer, can you send it to me @aminn75893596 ? (If you are still arround)
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)
Copy link to clipboard
Copied
Copy link to clipboard
Copied
As before: Undocumented, and unsupported.
Copy link to clipboard
Copied
I was able to figure out the info about most of the parameters. I can't remember where I got the list of the methods and parameters from GitHub, I just had them saved in a text file. But I've added the code comments below based on what I've figured out.
addTransition(
transition: object, // Transition object from qe.project.getVideoTransitionByName(), such as .getVideoTransitionByName("Cross Dissolve")
addToStart: boolean, // true = add transition to start of clip and end of the clip, false = add to end of clip only
inDurationString?: string, // Duration in frames ("30") or seconds+frames ("1:30")
inOffsetString?: string, // Offset timing - Seems non-functional, couldn't figure it out, but works when using "0:00"
inAlignment?: number, // Position relative to cut: 0 = start at cut, 0.5 = center at cut, 1 = end at cut
inSingleSided?: boolean, // Seems to force transition to only one side of the clip. Set to false if you'll want the transition to span across the cut
inAlignToVideo?: boolean, // Purpose unknown - using either true/false seems to work
): boolean; // Returns success/failure of adding transition
So example usage, where this would have a 30-frame transition centered on the cut, the transition would be only at the end (right side) of the clip.
var transitionToUseObject = qe.project.getVideoTransitionByName("Cross Dissolve");
whateverQETrackItem.addTransition(transitionToUseObject, false, "0:30", "0:00", 0.5, false, true);
Edit: I found the source of the list of QE Dom methods, not sure how complete it is:
GitHub - types-for-adobe-extras / Premiere
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)