Query Setting Brush Tool

My objective is to …

  1. Make a Curves Adjustment Layer
  2. Set the Brush Tool

Both to be in the same BatchPlay

Code for making a curves adjustment layer & Setting the Brush Tool

await batchPlay(
[
   {
      "_obj": "make",
      "_target": [
         {
            "_ref": "adjustmentLayer"
         }
      ],
      "using": {
         "_obj": "adjustmentLayer",
         "type": {
            "_obj": "curves",
            "presetKind": {
               "_enum": "presetKindType",
               "_value": "presetKindDefault"
            }
         }
      },
      "_isCommand": true,
      "_options": {
         "dialogOptions": "dontDisplay"
      }
   }
],{
   "synchronousExecution": false,
   "modalBehavior": "fail"
});

await batchPlay(
[
   {
      "_obj": "select",
      "_target": [
         {
            "_ref": "paintbrushTool"
         }
      ],
      "_isCommand": true,
      "_options": {
         "dialogOptions": "dontDisplay"
      }
   }
],{
   "synchronousExecution": false,
   "modalBehavior": "fail"
});

Issue…
If I have Auto Select Target Adjustment Tool enabled in the curves option then the Brush Tool Never gets selected but if the Auto Select Target Adjustment Tool is Disabled then it works.

Does anyone know how to make this work if the Auto Select Target Adjustment Tool is Enabled ?

What if you run both descriptors in same BP? I’m not an expert on this, but could it be, that your async BP for brush selection finishes before curves layer is created?

I would have thought that the curve would have had to have finished before the brush was selected because I am using await

Oh, right… Misread that. Don’t know then, but it wouldn’t hurt to try in a same BP anyway :slight_smile:

Just tried them in the same BP but still the same.
Got me a little baffled this one has