3 Replies Latest reply on Jan 11, 2016 1:16 PM by Bruce Bullis

    Having trouble deleting transitions with the api

    raphaelmatto14 Level 1

      Hi friendly Adobe peeps,

       

      I'm having trouble deleting transitions with the Premiere api. I've been using QE, thusly (simplified from a loop):

       

      app.enableQE();

      qe.project.getActiveSequence().getVideoTrackAt(0).getTransitionAt(0).remove()

       

      ... & it works but there is a memory leak, so I can't run the script twice. I chatted to bbb_999 offline & he suggested I don't use QE, so I've got this now:

       

      app.project.sequences[0].videoTracks[0].transitions[0].unbind(true)

       

      ... which returns Undefined and the transition isn't deleted. I suspect I'm not passing the correct parameter to the unbind method. Any help would be appreciated!

       

      As a side question: how do I find the arguments list for methods, since there is no documentation? I'm getting pretty exhausted browsing the DOM in ExtendScript Toolkit and then guessing what method arguments might be.

       

      Cheers,

      Raphael

        • 1. Re: Having trouble deleting transitions with the api
          Bruce Bullis Adobe Employee

          The first method is the correct one; unbind() won't remove a transition. What's the memory leak problem you encounter?

           

          > how do I find the arguments list for methods, since there is no documentation?

           

          Look in PProPanel, and if usage isn't exercised there, ask.

           

          While a couple of screen movie tutorials are being worked on, no further documentation is currently planned. Hopefully, a comforting thought; there are >140 panels in the wild, and none of them had more documentation than you do.

          • 2. Re: Having trouble deleting transitions with the api
            raphaelmatto14 Level 1

            Below is the thread where you mentioned the qe dom as being "un-recommended" -- which is why I took a crack at it with the "normal" dom. This is actually mission-critical in this case. I need a way to reliably remove all transitions on all sequences in the open project. I can't ask the editors to close/open Premiere to clear the memory because their projects are too complex w/effects etc (they take 5 to 10 minutes to open).


            Cheers,

            Raphael


            //--


            Thanks for the init command. Didn’t help in this case, but I’ll keep it up my sleeve. Looks like there’s lots of useful stuff in the qe dom, too bad about the refreshing issue!

             

            Cheers,

            Raphael

             


            //--


            Yep; unreliable refreshing of DOM objects is the primary reason QE DOM is un-recommended.

             

            qe.project.init() can often 'jiggle the handle', enough to get your changes noticed.


            //--


            Hi again bbb,

             

            Quick question for you: is there a way to clear memory in Premiere?

             

            I’m having an issue where I can run the removeTransitions (video) function in your purginator panel once, but it won’t work again until I restart Premiere. A clue: when I open a different Premiere file & ask the api for the number of tracks in the active sequence, it gives me the number of tracks in the document I’ve closed.

            • 3. Re: Having trouble deleting transitions with the api
              Bruce Bullis Adobe Employee

              The QE DOM remains officially unsupported and unrecommended. It's also the only way to do some things.

               

              I've sent a (hopefully) relevant sample panel, directly to you.