Advertisement
FlexLetsPlay

[PPSCRIPT] Insert Clip from Project Tree

Mar 22nd, 2018
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #target premierepro
  2.  
  3. //This Takes a Video Transition File from the Project Tree "Edit/ScreenWipe.avi"
  4. //and pastes it in the current player position, -0.5 seconds, in the most Top video layer
  5. //audio gets imported automatically too
  6.  
  7. var seq = app.project.activeSequence;
  8. var pos = seq.getPlayerPosition();
  9. pos.seconds -= 0.5;
  10. seq.setPlayerPosition(pos.ticks);
  11.  
  12. var track = seq.videoTracks[seq.videoTracks.numTracks - 1];
  13. for(var i = 0; i < app.project.rootItem.children.numItems; i++) {
  14.     if(app.project.rootItem.children[i].name == "EDIT"){
  15.         for(var j = 0; j < app.project.rootItem.children[i].children.numItems; j++) {
  16.             if(app.project.rootItem.children[i].children[j].name == "ScreenWipe.avi"){
  17.                 track.insertClip(app.project.rootItem.children[i].children[j], pos.seconds);
  18.                 break;
  19.             }
  20.         }
  21.     }
  22. }
  23.  
  24. app.project.save();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement