No internet connection
  1. Home
  2. How to

Is there a way to deselect a track?

By @anon6770933309
    2018-06-28 20:17:39.909Z

    So I am going to a specific track with this code:

    var track = sf.ui.proTools.trackGetByName({
        name: 'Track 1',
        makeVisible: true
    }).track;
    
    track.trackScrollToView();
    

    There are other actions that follow but I do not want the track to be selected. Basically I want a scroll to view without selecting the track or deselect it right afterwards. Possible?

    makeVisible: false
    

    is not working.

    Solved in post #2, click to view
    • 11 replies
    1. This should work:

      sf.ui.proTools.trackDeselectAll();
      
      Reply1 LikeSolution
      1. The scroll to view algorithm is dependent on selecting the track, so the easiest solution is to deselect right after.
        If you want to restore the track selection we'll need some more code :)

        1. ?@anon6770933309
            2018-06-28 20:54:12.974Z

            Yes, exactly what I wanted, perfect. 😀 👍

            1. In reply tochrscheuer:
              U@Ugosound
                2019-10-30 22:45:04.179Z

                @chrscheuer

                What would be the script to Deselect ONLY the first track of a multiple track selection prior to rendering?

                I have tried a few script but I keep getting an "undefined" error message. Thanks!

                1. Hi Ugo :)

                  Yes you can do that with this script:

                  sf.ui.proTools.trackSelectByName({
                      names: sf.ui.proTools.selectedTrackNames.slice(1),
                      deselectOthers: true,
                  });
                  

                  OR - use the built in PT shortcut: Ctrl+Alt+P.

                  OR, maybe the best option of all, invoke a menu click:

                  sf.ui.proTools.menuClick({
                      menuPath: ['Edit', 'Selection', 'Remove Edit from Top']
                  });
                  
                  1. U@Ugosound
                      2019-10-30 23:09:18.953Z

                      Awesome. I tried the last one right away and it did the trick!

                      (I actually did not know that function or I would not have bothered you... :)

                      Thanks!

                      1. Haha it's fairly new (under 1 year I think) so I don't blame you ;)

                2. In reply tochrscheuer:
                  Ingo Pusswald @ingo_luftrausch
                    2019-09-10 10:33:08.253Z

                    Hi Christian,
                    is there a way to deselect a Track (within a multible track selection) which name includes eg "Marker"?

                    I use video clips groups for szene merkers. When I edit ambiences I just need to double click on a clip-group and the szene is selected. But I need to de-select the "Marker" video track manually to do further editing like paste etc.

                    thanks

                    1. Hi @ingo_luftrausch

                      Sorry I hadn't seen this post.
                      Yes you can do that - see this script for an example:

                      sf.ui.proTools.trackSelectByName({
                          names: sf.ui.proTools.selectedTrackNames.filter(n => n.toLowerCase().indexOf('Marker'.toLowerCase()) < 0),
                          deselectOthers: true,
                      });
                      
                      1. UUser05, Gilyd @User05_Gilyd
                          2022-01-28 12:56:00.123Z

                          Hi Christian, is there a way to deselect for example "DX 1" directly instead of scrolling through the tracks? I usually have a group with a reference track that needs to be deselected to be able to Auto Align :-)

                          1. I don't think we have a Track Deselect action currently.