1 Reply Latest reply on Oct 29, 2016 2:59 PM by Thomas_Szabo

    CTI.Timecode

    billgarv2007

      Hello,

       

      I changed the start time of my sequence to 01:00:00:00 and when I run my script to get the cti timecode it returns the timecode as if it started at 00:00:00:00.  Anyone know why this is happening, is it a bug?  Code below...

       

      function returnTimecode()

      {

           app.enableQE();

             var seq = qe.project.getActiveSequence();

       

                if (seq != null){

                      alert(seq.CTI.timecode);

                      } else {

                          alert("Active Sequence required.")

                          }    

      }

      returnTimecode();

        • 1. Re: CTI.Timecode
          Thomas_Szabo Level 3

          Hi,

          confirmed, same here. Seems like your only option is to calculate the CTI position like this:

           

          var seq = qe.project.getActiveSequence();

          var currentTicks = parseInt(seq.CTI.ticks);

          var zeroPoint = parseInt(app.project.activeSequence.zeroPoint);

          var timebase = app.project.activeSequence.timebase;

          var ticks =  254016000000;

           

          $.writeln((currentTicks + zeroPoint)/ ticks); // current time in sec

          $.writeln((currentTicks + zeroPoint)/ timebase); // current time in frames

           

          Thomas