2 Replies Latest reply on Jul 27, 2017 6:49 AM by Bruce Bullis

    How to differentiate between normal clips and sub-clips

    emam-dev Level 1

      Hi All,

       

      How to differentiate between normal clips and sub-clips using Premiere extendscipt API?

       

      Like the ProjectItemType.FILE and ProjectItemType.BIN;

      We Cannot use ProjectItemType because for normal clips and subclips its value is ProjectItemType.CLIP only

       

       

      Thanks and Regards,

      ANOOP NR

        • 1. Re: How to differentiate between normal clips and sub-clips
          e.d. Level 3

          Hi Anoop,

           

          there is a difference in the metadata.

          If you use app.project.rootItem.children[x].getProjectMetadata(); , you'll have 3 entries like

           

          <premierePrivateProjectMetaData:Column.Intrinsic.SubclipStart>hh:mm:ss:ff</premierePrivate ProjectMetaData:Column.Intrinsic.SubclipStart>

          <premierePrivateProjectMetaData:Column.Intrinsic.SubclipEnd>hh:mm:ss:ff</premierePrivatePr ojectMetaData:Column.Intrinsic.SubclipEnd>

          <premierePrivateProjectMetaData:Column.Intrinsic.SubclipDuration>hh:mm:ss:ff</premierePriv ateProjectMetaData:Column.Intrinsic.SubclipDuration>

           

          which are the only direct indication that the projectItem is a subclip, so basically you just need to regex-match against the above result if you need "binary" handling (do something or don't).

          2 people found this helpful
          • 2. Re: How to differentiate between normal clips and sub-clips
            Bruce Bullis Adobe Employee

            What will that differentiation allow you to do, Anoop?

             

            app.project.FindItemsMatchingMediaPath() will give you all instances of that same file in the project, but users can import multiple such instances without making any subclips...