5 Replies Latest reply: May 24, 2012 7:02 AM by Pedro Cortez Marques RSS

    Sort by Type view to default... Possible?

    Pedro Cortez Marques Community Member

      Is it possible to put order viewing files on Bridge always "Sort by Type" by default?

       

       

      I want to open a folder always on Sort by Type view, manually change order (some times) and choose another new folder again Sort by Type viewed.

      This over and over again.

       

      It always open the new folder in the last manually order I don't want.

        • 1. Re: Sort by Type view to default... Possible?
          Omke Oudeman Community Member

          It always open the new folder in the last manually order I don't want.

           

           

          I'm afraid almost the rest of the world does want the behavior you don't want...

           

          But serious, this is as designed for Bridge, the window keeps the sorting order you have chosen.

           

          There are some workarounds but probably not what you are looking for.

           

          You can choose to save a workspace including sort order but you have to reset the workspace each time you choose a new folder and just as easy you can either choose the sort order in the path bart or using the right mouse click menu and at the bottom point to the correct sort order.

           

          Maybe using the filter panel will suite you better? If you create a workspace with both folder and filter panel in view you can pick a folder and then in the filer panel click on the file type you want to view. This reveals only the files of that type. Click again to uncheck reveals all files back in view, click on multiple types reveals each type you have selected in this panel.

           

          Hope this helps a bit to ease the pain

          • 2. Re: Sort by Type view to default... Possible?
            Paul Riggott Community Member

            You could try this, it does not work on the first folder when Bridge is opened but seems to then work for all changed folders.

             

             

            eventChanged =false;
            onCheckDocument = function(event){
              if(event.object instanceof Document){
                        if(event.type == "selectionsChanged" ) eventChanged = true;
                        if(event.type == "loaded" && eventChanged == true ) {
                            app.document.sorts = [{ type:"string",name:"document-kind", reverse:false }]; 
                            eventChanged =false;
                            }  
               return {handled:false}; 
              }
            }
            app.eventHandlers.push({handler: onCheckDocument});
            
            
             
            • 3. Re: Sort by Type view to default... Possible?
              Pedro Cortez Marques Community Member

              Hi Paul

               

              Your script helped me and I can open everu new folder of images always by-kind.

              The fact is that the event called is also changing is when I don't want it.

               

              You were right, it doesn't change the firs time but only the new folders opened.

               

              1- I click a new folder (I want to choose manually only the CR2 ones - so I need "document-kind" ordered - and this seams ok)

              2 - I change the order of CR2 to what I want (manually-ordered) and opened them. The bug is in here. when I change to manulally-order (only the first time!) it makes the event alone and it changes automatically to document-kind order. I don't want this. Then it makes me to put the order again.

               

              The clic (the event) I want to be readed and apllied is when I click any new folder with a bunch of images. That's it.

               

              Is it possible?

              • 4. Re: Sort by Type view to default... Possible?
                Paul Riggott Community Member

                Unfortunately there is no event for change folder.

                The nearest I can do is add a check so that if you are in manual sort it will not switch to kind.

                So you would need to change from manual sort to any other sort for the script to auto select kind.

                 

                
                

                eventChanged =false;

                onCheckDocument = function(event){

                  if(event.object instanceof Document){

                            if(event.type == "selectionsChanged" ) eventChanged = true;

                            if(event.type == "loaded" && eventChanged == true ) {

                                if(app.document.sorts[0].type != "user"){

                                app.document.sorts = [{ type:"string",name:"document-kind", reverse:false }];

                                eventChanged =false;

                                    }

                                } 

                   return {handled:false};

                  }

                }

                app.eventHandlers.push({handler: onCheckDocument});