Brush Flow is NaN

I am running the following in a batchPlay command:

const brushOptions = {
        _obj: "get",
        _target: [
          {
            _property: "currentToolOptions"
          },
          { _ref: "application" }
        ]
      };
const toolOptions = await batchPlay([brushOptions], {synchronousExecution: true})[0].currentToolOptions;

Why is toolOptions.flow showing as NaN? Photoshop’s brush flow shows a normal int?

What is the value in UI?

The last set value!

ie: I manually set the flow in Photoshop to 20 for example and then used the code above to get the flow value and it comes back as NaN

Hmm, that could be a bug. @Tom

I’ve also noticed the following behaviour:

  • Retrieving the values shows as NaN
  • Sending new updated brush values does not seem to work for Smudge - Brush Flow/Strength.
    • It works for Sharpen and Blur
    • Smudge’s other brush properties (ex: angle) are working fine

We need exact steps to reproduce an issue in order to fix it.
PS version, your OS, Image > Mode, bits per channel, what you do before reading that value and what tool is showing NaN?

On my machine I don’t see it with NaN.

Photoshop Version: 24.1
Machine: M1 Mac Mini
Operating System: macOS Ventura 13.1
Image Mode: RGB Color, 16 Bits/Channel

I am on the Smudge tool and the brush flow/strength value on photoshop is 40% (arbitrary).
This is what I am doing inside of a brushFlowStrength function (with a exeModal() inside)

const brushOptions = {
        _obj: "get",
        _target: [
          {
            _property: "currentToolOptions"
          },
          { _ref: "application" }
        ]
      };

 const toolOptions = await batchPlay([brushOptions], {synchronousExecution: true})[0].currentToolOptions;
const currBrushFlow = toolOptions.flow; // shows as NaN
1 Like