-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Description
From the documentation (https://ai-scripting.docsforadobe.dev/), if you go to "Javascript Object Reference"->"SpotColor"
It says spotColor.tint
but that didn't work for me. I had to do Object.fillColor.tint
to get the tint to work properly. Initially I did what the doc says and then did Object.fillColor = spotColor
. Debugging shows the tint was set correctly but visually I couldn't see it. So, I found that the Object.fillColor.tint
worked best.
Is anyone able to explain what is happening? Am I using it wrong?
function setFill(item, spotName, tintValue) {
var doc = app.activeDocument;
var spot;
try {
spot = doc.spots.getByName(spotName);
} catch(e) {
err("Cannot find spot: " + spotName);
return;
}
item.selected = true;
var sc = new SpotColor();
sc.spot = spot;
item.fillColor = sc;
item.fillColor.tint = tintValue;
}
Metadata
Metadata
Assignees
Labels
No labels