Opacity, flow, hue etc.. on a dial
Hello everyone,
I'm trying to create a script for brush opacity, hue, flow and other stuff because I want to put those on a dial..
here my script but I get the error 21: undefined is not an object line 5: if (activeTool.kind == ToolKind.BRUSH) {
Anyone can help? Thanks
// Get the active brush tool
var activeTool = app.activeTool;
// Check if the active tool is a brush tool
if (activeTool.kind == ToolKind.BRUSH) {
// Get the current opacity of the active brush
var currentOpacity = activeTool.settings.opacity;
// Calculate the new opacity
var newOpacity = currentOpacity - (currentOpacity * 0.05);
// Set the new opacity of the active brush
activeTool.settings.opacity = newOpacity; } else { alert("Please select a brush tool"); }
