Associate Brush/Tool Preset with Layer

I know there's a way to do this via scriptinglistener, so I figured I'd post it here. Wondering if there's a way to select a brush or tool preset automatically whenever you select a layer.
For example, there are 2 layers:
'Airbrush' - I only want to use the tool preset 'MyAirbrush' on this layer and never use any other brush or tool preset
'Pastel' - I only want to use the tool preset 'MyPastel' on this layer and never use any other brush or tool preset
So, when I select the layer 'Airbrush', it will automatically select the tool preset 'MyAirbrush' along with it. And whenever I switch to the layer 'Pastel', it will automatically select the tool preset 'MyPastel'. This would eliminate having to select the tool preset after selecting the layer (no big deal but could save time and eliminate a step)
Like I said I can acheive it via scriptinglistener, but then it becomes confusing because instead of simply switching layers in the layer panel, I'd have to run the script instead, and each script would reflect only one individual layer and the tool preset to go with it- I'd have to create a script for every layer doing it this way - not feasible. I was wondering if there was another way to do it somewhere in Photoshop, such as 'link tool preset to layer' or 'associate tool preset with layer'
thanks!

function _selectLayerHandler(desc) {
  var layerName = app.activeDocument.activeLayer.name;
  switch( layerName ){
      case "Airbrush": selectPreset('Airbrush-Grainy Opaque'); break;
      case "Pastel": selectPreset('Angle - Flat Opaque'); break;
function selectPreset(presetName) {
    var desc = new ActionDescriptor();
        var ref = new ActionReference();
        ref.putName( stringIDToTypeID( "toolPreset" ), presetName);
    desc.putReference( charIDToTypeID( "null" ), ref );
    executeAction( charIDToTypeID( "slct" ), desc, DialogModes.NO );
try {
  if (arguments.length >= 2) {
    var desc = arguments[0];
    var event = arguments[1];
    if (event == charIDToTypeID('slct')) {
      var ref = desc.getReference(charIDToTypeID('null'));
      var cls = ref.getDesiredClass();
      if (cls == charIDToTypeID('Lyr ')) {
        _selectLayerHandler(desc);
} catch (e) {
  alert( "Error: " + e + ":" + e.line );

Similar Messages

  • Brush Tool Error with Layer Masks

    I've identified a layer mask bug in Photoshop 14.2.1 for Mac. When working with non-vector layer masks, the brush tool will not paint a darker value than the white level present in the mask. For instance:
    when a layer mask is created from the icon at the bottom of the layers window, the mask itself is white, representing full visibility in the masked layer. If you attempt to use the brush tool with 100% black (to actually mask something in the applicable layer), it does not function. I am able to use the paint bucket tool and the pencil tool to fill black in the mask, but not the brush tool. If the mask is 67% grey, and my brush tool is set to 66% grey, it still will not affect the mask; the white level cannot be decreased, only increased with the brush tool. Bug!

    Sure. A mask is just a greyscale image and the blending mode is a property of the brush tool not the mask.
    It is actually a very useful feature especially for extracting hair. When painting with black/white in overlay mode you can easily clean up the edges without affecting the pure black/white parts of the mask.

  • Texture attributes not saving with an Art History brush tool preset.

    I am sure that in the past Texture settings saved when I loaded a saved Art History Brush tool preset.  But suddenly, the Texture setting - specifically Depth, is not being remembered.  In other words - I have saved an Art History Brush as a Tool Preset. I have then used some other brushes and experimented with texture including the Depth setting.  When I go back to the saved tool preset, the Texture Depth setting has changed to whatever it was when I last used it - not its saved value.  I thought the point of Tool Presets is that they save all brush characteristics.  Maybe I have got this wrong.
    Help or info would be much appreciated.  I'm using CS6.
    ...this is weird.  The tool presets and their Texture attributes work fine in CS5.  Maybe I need to reinstall CS6.

    ...I reinstalled CS6 and imported old preferences.  The problem of reluctant attributes persisted after installation.  The answer appears to have been to reset the preferences.  Texture settings now behaving themselves.   I should have tried this first.  Oh well.

  • Why when I use Brush Tool on a layer mask, I must click on somewhere else then I am able to see my effects of my previous brush on my mask

    Why when I use Brush Tool on a layer mask, I must click on somewhere else then I am able to see my effects of my previous brush on my mask.
    If I don't click click on somewhere else, I cannot even see my current brush effects
    This kind of problem really slow down my work flow. So if you guy know the solution of my problem, please let me know.
    Thanks

    Update your graphics driver/ turn off GPU usage in the performance prefs. You have an issue with hardware-based transparency handling most likely. Otherwise you could have an issue with your input device, but since you have not provided any system info, we can't really know anything.
    Mylenium

  • Brush 'Tool Presets' not resizing and behaving erratically.

    Hello all,
    I'm running Ps CS6 Extended on a Macbook Pro running OS X 10.6.8. My problem is that suddenly my brush 'tool presets' seem to have gone crazy. Standard pencil brushes won't resize (in fact anything with a texture ticked on in the brush panel seems to be having trouble) and others are just spitting out plain old rubbish.
    I haven't updated anything or run anything different.. It just seemed to happen and now won't go back...
    Is this an issue that anyone has encountered before? Let me know what other info would be helpful to fully explain the issue...
    A similar thing did happen with one random brush ages ago. I couldn't resolve it so I just ignored it. But now my whole set is messed up. It's weird...

    Thanks, Trevor.
    I've tried, restarting everything. I've tried opening the .tpl's in an older version of Photoshop that I have (CS5.1 Extended) - and they work fine (that version also has Colourus 2 and Perspective Create extensions that I have on CS6), so I know the .tpl's are sound and the brush info is saved correctly in them.
    I tried 'reset brushes' in the tool preset drop down menu... But I don't know what "reset Preferences" is - should I be looking in Photoshop>Preferences...?
    I tried 'reset tool' but that just makes the brushes go back to their earliest round brush form.
    Any other ideas? Thanks for thinking on this... 

  • Create Brush Tool preset without color assignment

    I want a Brush tool preset which uses the CURRENT foreground color, not the color at the time of the preset creation.
    I DO want the preset to remember the SIZE and type of brush, but use the Current Foreground color...
    Is there a way to do this?

    When you save a New Tool Preset there is a check box in the name dialog to either include color or not. If you uncheck that box a brush tool preset will use the foreground color.

  • Clone or Healing Brush Tool Creates Ghost Layer or Image - Unusable

    I am using the latest version of Photoshop CS5.5 on a fully updated MacBook Pro.
    I am having issues with the following tools:
    Clone Stamp Tool,
    Healing Brush Tool,
    More details:
    Essentially it "appears" that Photoshop is duplicating the layer and the layers appears to be dragged whenever the cursor is moved. I do not need to be holding down the mouse button for the layer to follow the cursor.
    If I click outside of these tools then photoshop functions as normal, and this extra layer-effect disappears. Clicking back to those tools however causes it to reoccur.
    From testing, when first selecting these tools (on program startup) nothing occurs. It's only when I select the target area (option+click) to use the tools does this problem begin.
    I have checked, and no layer is duplicated. It is also a single image (so not a copy on top of the original).
    I have been using Photoshop for a few years now and familiar with it's interface and functioning. Initially it was working fine on this laptop, however in the last few months this problem has begun and persisted. On other computers it is functioning fine. A complete uninstall and reinstall of Adobe on the laptop has made no change either.
    Please can someone help? Thanks in advance for any assistance or guidance you can provide.

    I am not saying that this will absolutely sort your problem but it is a good place to start.
    Try resetting your Photoshop Preferences. Check out this post for instructions.
    http://forums.adobe.com/thread/375776
    Good luck

  • Where is the brush tool associated with tablets gone to in CS6?

    I have a problem right now. Do you know that icon which is next to the brush size icon once you select the brush tool?
    That icon once you insert a drawing tablet in so that your drawings can be better with how much pressure you put into it? I forgot the name of it but it does not appear when I put my tablet in.. But it worked in CS5.5.
    HELP PLEASE. Without this tool, I basically bought CS6 for no reason as this is the most important thing I need to even begin any work.

    Hey there! Thanks for your reply as the whole adobe forum did not bother..
    But I already sought out my problem too by going on another forum and basically downloading the program that came with my bamboo tablet.. I left my installation CD at home you see, so I forgot that was what I needed to get the pressure sensitivity thing back. And I got it!
    Thanks, and what 'updates' were you talking about?

  • How to create a 'Previous History' brush tool along with content aware

    Truly did not know how to create a good title here.
    When you use the 'Content Aware' tool and move subject 'A' to point B what happens is that A now sits on top of B which in turn means part of the image within B may be missing and you may still want it there where it was and where it should be. You could use the 'history brush' tool to brush away part of the new insert and erase what is there to reveveal what was there. How do you do the same thing to image A which now sits on B (to reveal what was there on A originally). What I mean is this. I moved a person from point A to point B. but parts of this person are missing (his ear, his knee, his shoe) so how do I get those parts back (in the new location)?
    The history brush tool appears to be erasing by subtracting, what I would like to do in this case of course is not subtract but add or 're-add'.
    Thank you

    Hello,
    here's a possible solution, before using content aware, take a snapshot of A and B, then use it as your history brush source whenever you need to 're-add':
    please post back if you have any questions

  • Crop and brush tools jittery with Wacom tablet

    Immediately upon installing LR CC 2015 many of my functions using a Wacom Intuous 4 tablet have become jittery and slow. The crop frame wants to jerk around and keeps rotating with no input from me. It is difficult to cancel using Esc key. Slow and jittery also describes various brush operations, including Heal/Clone.
    Am using the Yosemite Beta, but was also doing so with LR 5 (2014) and did not have any of these problems.

    I'm having a similar issue on a Windows 8.1 machine, also using an Intuos 4, and a Bamboo Pen on our other machine. Not only are the tools jittery, but the pen will only "grab" sliders in the develop module about 20% of the time. This makes editing with a tablet near impossible. Any ideas what might cause this?

  • Brush Tool/Layer Mask not working. Please help!

    When I use the brush tool on the layer mask after using the quick selection tool and refining the mask, the black doesn't do anything and the white erases the image.

    Look at Options bar. Is the brush in Normal blending mode?

  • Toggle Tool Presets

    hi, this is a follow-up on another thread concerning toggling between a brush tool preset and an eraser tool preset. I've assembled the following script (mostly from csuebele) to try to toggle between "AIRBRUSH 1" (brush tool preset) and "Eraser Chiseled" (eraser tool preset). But it only works for the eraser tool preset when the eraser tool is active. It won't work with the brush tool preset whenever the brush tool is active, it gives an error "The command "select" is not currently available".
    function getCurrentTool(){
           var ref = new ActionReference();
               ref.putEnumerated( charIDToTypeID( "capp" ),
    charIDToTypeID( "Ordn" ), charIDToTypeID( "Trgt" ) );
            var desc1 = executeActionGet(ref);
           desc1 = desc1.getList(stringIDToTypeID("tool"));
             desc1 = desc1.getEnumerationType(0);
             desc1 = typeIDToStringID(desc1);
             return desc1;
           if(getCurrentTool() == "brushTool"){
    // =======================================================
    var idslct = charIDToTypeID( "slct" );
        var desc3267 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref1620 = new ActionReference();
            var idtoolPreset = stringIDToTypeID( "toolPreset" );
            ref1620.putName( idtoolPreset, "AIRBRUSH 1" );
        desc3267.putReference( idnull, ref1620 );
    executeAction( idslct, desc3267, DialogModes.NO );
    // =======================================================
              }else{
                 var idslct = charIDToTypeID( "slct" );
        var desc3276 = new ActionDescriptor();
        var idnull = charIDToTypeID( "null" );
            var ref1625 = new ActionReference();
            var idtoolPreset = stringIDToTypeID( "toolPreset" );
            ref1625.putName( idtoolPreset, "Eraser Chiseled" );
        desc3276.putReference( idnull, ref1625 );
    executeAction( idslct, desc3276, DialogModes.NO );

    I guess the link in the earlier thread answered it for me. Apparently, the user order cannot be saved in the Tool Presets, though they can be in the Brushes Presets.
    I solved my issue by adding "Artist's" in front of the brushes I need near the top, like Artist's Round Chalk - Opaque.
    Regular Brushes are in a groupling below the Mixer Brushes.
    I'd love to see this changed in a future version of Photoshop.
    M. Jackson

  • Brush Tool is not working with Layer Mask

    Working with Windows platform, using Photoshop CS4, Brush Tool is not working with Layer Mask, how can I resolve this challenge?

    Also, do you have any Selections active - maybe hidden?
    When you have your Layer Mask's Channel active, do your Colors change to black and white?
    Good luck,
    Hunt

  • Problem using Brush tool with layer mask in Photoshop CC.

    Using Photoshop CC, working on a layer mask.  Using the Brush tool to paint white to show the effect works like normal.  Painting black has no effect.  Just started doing this in the last two days.

    Check you Brush blending mode setting in the tools option bar.

  • Problem with Wacom Tablet and Brush Tool

    When using the brush tool with an Intuos 5 tablet (mostly to edit layer masks), PS will become unresponsive to pen input - that is, I can't draw. The cursor moves, and I can switch tools with the keyboard, but pressing with the pen to tablet does not register. If I click with the mouse, it will register. If I use the spacebar to get the grabber hand then click and drag, the pen will again become responsive. If I click on a palette with the pen, I can draw again.
    I have been in touch with Wacom, and at their suggestion, I have:
    1. Downgraded the driver to the previous version.
    2. Reinstalled the driver.
    3. Connected the tablet directly to the computer rather than using a hub or wireless kit
    This problem also occurred on my previous computer (mac pro 8x2.8ghz, os 10.8)
    When using the same tablet with my laptop, the problem does not occur, nor does it occur when using a Bamboo tablet on the Mac Pro.
    I don't see the problem occurring with other tools, but I don't use them as frequently.
    One other thing I should mention is that I'm working on very large files (2-6G) but do have 64G of memory installed.
    Currently using:
    Mac Pro 8x2.93ghz
    Mac OS 10.9.1
    PS 13.0.6
    I've been back and forth with Wacom via email for about a mothh, and I suspect they are out of troubleshooting options. They suggest the problem is with PS, but I'm not really sure.

    Hi CoGordo4,
    Make certain you have "New Art Has Basic Appearance" checked in the Appearance Panel menu.
    Also realize that the "Basic" brush, isn't really a brush at all. It simply removes all brush appearances from a stroke.

Maybe you are looking for

  • Powerbook G4 and OS 10.2

    I was told that it is not possible to install OS 10.2 on the Powerbook G4 - Is it true they will only run with Tiger? I need to run an older version of Logic Audio that will only run on OS 10.2 R

  • Distributing Forms in LiveCycle using Acrobat 9

    I have created a four page form with flowable subforms and calculated fields.  The form works fine in preview but for some reason I can't get it to distribute.  The final form is anywhere from 1 to 4 pages depending on the options the user selects/ne

  • Pages background objects - not selectable

    Hi, I recently updates Pages and opened a document that I was previously working on (in the older version). I used to make background objects selectable in the inspector, the inspector has since changed and I cannot click on a textbox that I placed i

  • IDVD Menu Missing

    I burned a dvd from an iMovie I made and burned the DVD from iDvd. When I play the DVD back it jumps right into movie and does not have a menu come up that gives the person an option to click play. What do I do to correct this?

  • How to run TestStand script on a remote system from a TestStand script?

    I would like to run a test stand script on a remote system from within another TestStand script. How can this be done?