Reply To: Apply Multiply Effect and Clipping Path then Group images.

#85073
Ari Singer
Member

Here you go!

I understood that the top image has to stay with the regular blending mode and not multiply, am I correct? Becuase this is how I wrote the script:

//Ari S. - designerjoe@outlook.com
app.scriptPreferences.enableRedraw = false;
app.doScript(main, ScriptLanguage.JAVASCRIPT, undefined, UndoModes.ENTIRE_SCRIPT, "Image Manipulation Script");

function main(){
    try{
        var mySelection = app.selection[0];
        var bottomObject = mySelection;
        var topObject = bottomObject.duplicate();
        bottomObject.transparencySettings.blendingSettings.blendMode = BlendMode.MULTIPLY;
        try {
            topObject.pageItems.item(0).clippingPath.appliedPathName = topObject.pageItems.item(0).clippingPath.photoshopPathNames[0];
            topObject.pageItems.item(0).clippingPath.clippingType = ClippingPathType.PHOTOSHOP_PATH;
            try {
                var myGroup = bottomObject.parent.groups.add ([bottomObject, topObject]);
                app.select(myGroup);
                }
            catch (myError) {
                alert("could not group successfully");
                }
            }
        catch (myError) {
            alert("Selected image does not have a Photoshop path applied")
            }
        }
    catch (myError){
        alert("Make sure you selected a graphic frame");
        }
    }

G’luck!

This article was last modified on May 20, 2016

Comments (0)

Loading comments...