How to get the checkbox value of the Mixer Brush tool

New Here ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

I would like to know if it is possible to get the value of the checkbox "select all layers" from the mixer brush tool. I would like to prepare a script so that I can select only the layers I want to blend, without needing to hide the layers. It's possible? Which way should I follow? I'm still new to Photoshop script development

Capturar.PNG

TOPICS
Actions and scripting, How to

Views

1.1K

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

Just off band, the value of a check box is either true or false. Getting the values of the layers for mixing colors is beyond the capability of extendscript. Unless you're actually wanting if the checkbox value of true or false.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

 

sTT = stringIDToTypeID;

(ref = new ActionReference()).putProperty(sTT('property'), sTT('tool'))
ref.putClass(sTT('application')); (executeActionGet(ref))
.getObjectValue(sTT('currentToolOptions'))
.getBoolean(sTT('sampleAllLayers'))

 

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

Forgot to choose a tool and assign a value to something.
 
P.S. very "useful code" as always, especially for a beginner

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

Loll, I really don't care if someone is beginner unless there will be more questions 🙂

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

I have a question. Why do you need ref2 ???

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

I originally provided a code where script checked if the Mixer Brush is a selected tool. Then I realised original poster did not ask for it, so I removed it, but forgot to remove also other parts belonging to. Thanks for the question. I edited code, so now all remains are cleared 😉

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

to daniel16B7

// select tool
var r = new ActionReference();
r.putClass(stringIDToTypeID("wetBrushTool"));
var d = new ActionDescriptor();
d.putReference(stringIDToTypeID("null"), r);
executeAction(stringIDToTypeID("select"), d, DialogModes.NO);

// get options
var r = new ActionReference();
r.putProperty(stringIDToTypeID("property"), stringIDToTypeID("tool"));
r.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));

var flag = executeActionGet(r).getObjectValue(stringIDToTypeID("currentToolOptions")).getBoolean(stringIDToTypeID("sampleAllLayers"));           

alert(flag);

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

The user did not ask how to select Mixer Brush tool. Why do you assume he doesn't know how to do it?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

Then your code doesn't work, for example if a hand is selected.

Or it doesn't work correctly in other cases.

 

Why are you giving a non-working code?

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe Community Professional ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

I'm not giving a non-working code. It works when Mixer Brush is selected. He didn't say anything he wants a script to check if this tool is selected, and if it's not then to select it. Perhaps he would not like a script to switch tools, but keep already selected one, so not checking MixerBrush until it's manually chosen? I'm giving to him only that he stated.

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jun 06, 2021 Jun 06, 2021

Copy link to clipboard

Copied

LATEST

In fact, I would like to see the selected layers when I click on the checkbox of the mixer brush tool and from there remove some layers so they won't be merged

Likes

Translate

Translate

Report

Report
Community Guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines