Skip navigation
Currently Being Moderated

Brush tip names

Apr 4, 2012 6:51 AM

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.

 
Replies
  • Currently Being Moderated
    Apr 4, 2012 7:11 AM   in reply to Ghoulfool

    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;
    }
    
    
     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points