Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Configure mixer brush tool

Advocate ,
May 07, 2021 May 07, 2021

I have seen on the forum and have not found anything about it
I would like to configure the mixer brush tool with a script Schermata 2021-05-07 alle 12.25.41.png

 

I wish I could set all these parameters

saw.png
I hope it can be done since I use this tool a lot

 

TOPICS
Actions and scripting
4.6K
Translate
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

correct answers 2 Correct answers

Guide , May 07, 2021 May 07, 2021

 

#target photoshop;

var s2t = stringIDToTypeID,
options = {
    flow: 99,
    wetness: 99,
    dryness: 99,
    mix: 99,
    smooth: 99,
    autoFill: true,
    autoClean: true,
    sampleAllLayers: true
};

(r = new ActionReference()).putClass(s2t("wetBrushTool"));
(d = new ActionDescriptor()).putReference(s2t("target"), r);
d.putObject(s2t("to"), s2t("target"), objToDesc(options));
executeAction(s2t("set"), d, DialogModes.NO);


function objToDesc(o) {
    var d = new ActionDescriptor();
    
...
Translate
People's Champ , Jun 14, 2024 Jun 14, 2024
var options = new ActionDescriptor(); 
var options2 = new ActionDescriptor();

options2.putEnumerated(stringIDToTypeID("cropAspectRatioModeClass"), stringIDToTypeID("cropAspectRatioModeClass"), stringIDToTypeID("pureAspectRatio")); //targetSize, originalProportions, etc...
options2.putDouble(stringIDToTypeID("aspectWidth"),  0);
options2.putDouble(stringIDToTypeID("aspectHeight"), 0);
options2.putDouble(charIDToTypeID("CrWV"),  0);
options2.putDouble(charIDToTypeID("CrHV"),  0);
options2.putInte
...
Translate
Adobe
Community Expert ,
May 07, 2021 May 07, 2021

You should be able to create Presets and select the Presets via Script. 

Translate
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
Advocate ,
May 07, 2021 May 07, 2021

i tried with scriptenlistener but it's not good.

Translate
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
Community Expert ,
May 07, 2021 May 07, 2021

Applying a Tool Preset? 

Translate
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
Advocate ,
May 07, 2021 May 07, 2021

Done as you suggested
works well

however it is possible to do it with scripts

 

Translate
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
Community Expert ,
May 07, 2021 May 07, 2021

»however it is possible to do it with scripts«

Sorry; I do not understand what you are trying to say here. 

Translate
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
Advocate ,
May 07, 2021 May 07, 2021

Ok thanks for your help

 

Translate
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
Guide ,
May 07, 2021 May 07, 2021

 

#target photoshop;

var s2t = stringIDToTypeID,
options = {
    flow: 99,
    wetness: 99,
    dryness: 99,
    mix: 99,
    smooth: 99,
    autoFill: true,
    autoClean: true,
    sampleAllLayers: true
};

(r = new ActionReference()).putClass(s2t("wetBrushTool"));
(d = new ActionDescriptor()).putReference(s2t("target"), r);
d.putObject(s2t("to"), s2t("target"), objToDesc(options));
executeAction(s2t("set"), d, DialogModes.NO);


function objToDesc(o) {
    var d = new ActionDescriptor();
    for (var k in o) {
        var v = o[k];
        switch (typeof (v)) {
            case "boolean": d.putBoolean(s2t(k), v); break;
            case "string": d.putString(s2t(k), v); break;
            case "number": d.putInteger(s2t(k), v); break;
        }
    }
    return d;
}

 

 

 

This is a list of presetsIf you change any value using a scriptit will always be "custom" 

2021-05-08_00-49-48.png

Translate
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
People's Champ ,
May 07, 2021 May 07, 2021

прикольный способ 

👍

Translate
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
Guide ,
May 07, 2021 May 07, 2021

Согласен 🙂 Причем через .putClass можно назначать параметры в любой момент (вне зависимости от активного в данный момент инструмента).

Translate
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
LEGEND ,
May 07, 2021 May 07, 2021

I think the same - he did good job 😉

Translate
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
Participant ,
Jun 09, 2024 Jun 09, 2024

Is it possible to get such scripts for crop tool? . . Please help me sir @jazz-y 

Translate
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
Community Expert ,
Jun 10, 2024 Jun 10, 2024

Please explain what you mean exactly. 

Translate
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
Participant ,
Jun 10, 2024 Jun 10, 2024

I would like to configure the Crop tool with a script. 

I wish I could set all these parameters. . . Thank You Sir @c.pfaffenbichler 

ThihaSoe crop.jpg

 

 

Translate
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
Community Expert ,
Jun 10, 2024 Jun 10, 2024

I have not been able to change the settings via the currentToolOptions. 

You should be able to create Presets and select the Presets via Script. 

Translate
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
People's Champ ,
Jun 14, 2024 Jun 14, 2024
var options = new ActionDescriptor(); 
var options2 = new ActionDescriptor();

options2.putEnumerated(stringIDToTypeID("cropAspectRatioModeClass"), stringIDToTypeID("cropAspectRatioModeClass"), stringIDToTypeID("pureAspectRatio")); //targetSize, originalProportions, etc...
options2.putDouble(stringIDToTypeID("aspectWidth"),  0);
options2.putDouble(stringIDToTypeID("aspectHeight"), 0);
options2.putDouble(charIDToTypeID("CrWV"),  0);
options2.putDouble(charIDToTypeID("CrHV"),  0);
options2.putInteger(charIDToTypeID("CrWS"), 0);
options2.putInteger(charIDToTypeID("CrHS"), 0);
options2.putInteger(charIDToTypeID("CrRV"), 0);
options2.putInteger(charIDToTypeID("CrRS"), 1);
options2.putInteger(stringIDToTypeID("cropOverlay"), 2);
options2.putInteger(stringIDToTypeID("CropOptionsShowOverlay"), 1);
options2.putInteger(stringIDToTypeID("orientation"), 0);

options2.putInteger(stringIDToTypeID("cropShieldColorMode"), 1);

var c = new ActionDescriptor();
c.putDouble(stringIDToTypeID("red"),  200);
c.putDouble(stringIDToTypeID("green"),  0);
c.putDouble(stringIDToTypeID("blue"),   0);
options2.putObject(stringIDToTypeID("cropColor"), stringIDToTypeID("RGBColor"), c);

options2.putInteger(stringIDToTypeID("cropOpacity"), 75);

options2.putBoolean(stringIDToTypeID("cropAutoLightenShield"), true);
options2.putBoolean(stringIDToTypeID("cropShowShield"), true);
options2.putBoolean(stringIDToTypeID("preview"), false);
options2.putBoolean(stringIDToTypeID("cropAutoCenterCropBox"), true);
options2.putBoolean(stringIDToTypeID("cropShowCroppedArea"), true);
options2.putBoolean(stringIDToTypeID("AutoFillOnCrop"), true);
options2.putBoolean(stringIDToTypeID("hides"), false);

options.putObject(charIDToTypeID("CrpO"), charIDToTypeID("CrOC"), options2);

var r = new ActionReference();
r.putClass(stringIDToTypeID("cropTool"));

var d = new ActionDescriptor();
d.putReference(stringIDToTypeID("null"), r);
d.putObject(stringIDToTypeID("to"), stringIDToTypeID("null"), options);

executeAction(stringIDToTypeID("set"), d, DialogModes.NO);
Translate
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
Participant ,
Jun 18, 2024 Jun 18, 2024

That's so cool . Thank you so much Sir @r-bin 

Translate
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
Participant ,
Jun 19, 2024 Jun 19, 2024

Hello Sir @r-bin  . . . Where should I prepare to change this?crop.jpg

Translate
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
People's Champ ,
Jun 20, 2024 Jun 20, 2024
quote

Hello Sir @r-bin  . . . Where should I prepare to change this?crop.jpg


By @Thiha31203570tbl0

There is no such setting in my Photoshop. Ask someone else who has such Photoshop to research the "currentToolOptions" settings for this tool.

Translate
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
Explorer ,
Apr 22, 2025 Apr 22, 2025

Hi, about the “Load Solid Colors Only” script, is it easy to get the relevant code, I've been integrating my own painting script recently, but it's still hard to gather information about some of the functions, including the "Load Solid Colors I'm trying my best, maybe you can give me some tips, thanks!

Translate
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
Community Expert ,
Apr 23, 2025 Apr 23, 2025

Please post screenshots to illustrate what you are talking about. 

Translate
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
Explorer ,
Apr 23, 2025 Apr 23, 2025

22823642ltqo_0-1745394248006.png

Hello, about the “Load Solid Colors Only” script, I need how to get the toggle script for this feature, jsx

Translate
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
Community Expert ,
Apr 23, 2025 Apr 23, 2025

Edit: You should include a check for the intended Tool, though. 

// based on code by michael l hale and oleksii hirlin;
// 2025, use it at your own risk;
if (app.documents.length > 0) {
var ref = new ActionReference();
ref.putEnumerated( charIDToTypeID("capp"), charIDToTypeID("Ordn"), charIDToTypeID("Trgt") ); 
var applicationDesc = executeActionGet(ref);
var currenToolOpt = applicationDesc.getObjectValue(stringIDToTypeID("currentToolOptions"));
var solidColorOnly = currenToolOpt.getBoolean(stringIDToTypeID("loadSolidColorOnly"));
if (solidColorOnly == false) {setCTO([["loadSolidColorOnly", true]], true)}
else {setCTO([["loadSolidColorOnly", false]], true)};
};
// Oleksii Hirlin 2021
function getCTO(){
var ref = new ActionReference();
ref.putProperty(stringIDToTypeID("property"), stringIDToTypeID("currentToolOptions"));
ref.putEnumerated(stringIDToTypeID("application"), stringIDToTypeID("ordinal"), stringIDToTypeID("targetEnum"));
return executeActionGet(ref).getObjectValue(stringIDToTypeID("currentToolOptions"));
};
// setting currentToolOptions with options array
function setCTO( options, isIdTypeString ){
var desc = new ActionDescriptor();
var ref = new ActionReference();
ref.putClass( stringIDToTypeID( app.currentTool ) );
desc.putReference( stringIDToTypeID( "target" ), ref );
// getting current tool options so that they do not get reset
var ctoObj = getCTO();
// check if we are setting the eyedropper tool
if ( app.currentTool=="eyedropperTool" ){
ctoObj.putInteger( stringIDToTypeID( options[0][0] ), options[0][1] );
} else {
// iteration through options array and putting booleans into cto descriptor
for (var i=0; i < options.length; i++){
if (isIdTypeString==true){
ctoObj.putBoolean( stringIDToTypeID( options[i][0] ), options[i][1] );
} else {
ctoObj.putBoolean( charIDToTypeID( options[i][0] ), options[i][1] );
}
}
}
desc.putObject( stringIDToTypeID( "to" ), stringIDToTypeID( "currentToolOptions" ), ctoObj );
executeAction( stringIDToTypeID( "set" ), desc, DialogModes.NO );
};
Translate
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
Explorer ,
Apr 23, 2025 Apr 23, 2025
LATEST

Thank you very much! He can run and I try to read him as much as I can but it's too hard, I'm currently learning JavaScript before learning ps scripting, thanks again in the end!

Translate
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