Copy link to clipboard
Copied
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
I wish I could set all these parameters
I hope it can be done since I use this tool a lot
#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();
...
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
...
Copy link to clipboard
Copied
You should be able to create Presets and select the Presets via Script.
Copy link to clipboard
Copied
i tried with scriptenlistener but it's not good.
Copy link to clipboard
Copied
Applying a Tool Preset?
Copy link to clipboard
Copied
Done as you suggested
works well
however it is possible to do it with scripts
Copy link to clipboard
Copied
»however it is possible to do it with scripts«
Sorry; I do not understand what you are trying to say here.
Copy link to clipboard
Copied
Ok thanks for your help
Copy link to clipboard
Copied
#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;
}
Copy link to clipboard
Copied
прикольный способ
👍
Copy link to clipboard
Copied
Согласен 🙂 Причем через .putClass можно назначать параметры в любой момент (вне зависимости от активного в данный момент инструмента).
Copy link to clipboard
Copied
I think the same - he did good job 😉
Copy link to clipboard
Copied
Is it possible to get such scripts for crop tool? . . Please help me sir @jazz-y
Copy link to clipboard
Copied
Please explain what you mean exactly.
Copy link to clipboard
Copied
I would like to configure the Crop tool with a script.
I wish I could set all these parameters. . . Thank You Sir @c.pfaffenbichler
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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);
Copy link to clipboard
Copied
That's so cool . Thank you so much Sir @r-bin
Copy link to clipboard
Copied
Hello Sir @r-bin . . . Where should I prepare to change this?
Copy link to clipboard
Copied
Hello Sir @r-bin . . . Where should I prepare to change this?
By @Thihasoe531
There is no such setting in my Photoshop. Ask someone else who has such Photoshop to research the "currentToolOptions" settings for this tool.