2 Replies Latest reply: Apr 4, 2012 7:36 AM by Ghoulfool RSS

    Brush tip names

    Ghoulfool Community Member

      Am I right in thinking there's no way of finding out the current brush tip name with scripting? Apart from manually looking at the Preset Manager in text only mode. I thought it would be quite easy to reiterate though the current brushes and export out their names; but it's proving to be easier to do it by hand.

        • 1. Re: Brush tip names
          Paul Riggott Community Member

          This will get the current names...

           

           

          #target photoshop
          var Presets = getPresetList();
          var f = new File(Folder.desktop + "/Brush Tip Names.txt");
          f.open('w');
          for(var v in Presets){
           f.writeln(Presets[v]);
           }
          f.close();
          f.execute();
          function getPresetList(){
          var ref = new ActionReference(); 
             ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") ); 
             var appDesc = executeActionGet(ref); 
            var List = appDesc.getList(stringIDToTypeID('presetManager'));
            var presetNames=[];
              var list = List.getObjectValue(0).getList(charIDToTypeID('Nm  '));
              for (var i = 0; i < list.count; i++) {
                var str = list.getString(i);
                presetNames.push(str);
              }
          return presetNames;
          }
          
          
          • 2. Re: Brush tip names
            Ghoulfool Community Member

            That's a beautiful thing, Paul. Thank you.