1 Reply Latest reply on Feb 6, 2018 12:02 PM by Aecorn

    can i use insertClip to copy an existing clip (with custom inpoint/outpoint)?




      I am trying to use insertClip to make a copy of a clip from one track to another. However, I've noticed that if the clip has modifications to the inpoint/outpoint or duration, these changes aren't maintained across the copy. since its using the underlying projectItem, everything reverts to the original project items settings


      One workaround I've found is to create a subclip, then do insertClip(subclip, clip.start.seconds). however, when i do this on a project with tons of clips, it ends up creating a ton of extra project items which i dont want to have to manage


      is there a way to copy an existing clip without doing this subclip workaround?


      alternatively ---- is there a way to just move a clip from one track to another altogether?



        • 1. Re: can i use insertClip to copy an existing clip (with custom inpoint/outpoint)?
          Aecorn Level 1

          Im looking for a solution for moving a clip to another track as well.


          You can copy paste info from one clip to another now, so maybe you can try out inserting the clip into the correct track and then copying the edit info over? Try out my sample below. Add a video to your bottom layer and cut it up a bit.


          If anyone has hints on moving a clip from one track to another, that would be nice.


                  var clip1 = app.project.activeSequence.videoTracks[0].clips[0];

                  app.project.activeSequence.videoTracks[1].insertClip(clip1.projectItem, clip1.start);       

                  var clip2 = app.project.activeSequence.videoTracks[1].clips[0];



                  if (clip1.start.seconds > clip2.end.seconds){

                      clip2.end = clip1.end;

                      clip2.start = clip1.start;


                       clip2.start = clip1.start;

                      clip2.end = clip1.end;




                  clip2.inPoint = clip1.inPoint;

                  clip2.outPoint = clip1.outPoint;

                  clip2.duration = clip1.duration;