Answered
there's a way for both extremely complicated topics
1. check if an object has an Opacity Mask
2. transform object with Opacity Mask
1. check for Opacity Mask as described in this post by @m1b
2. turn object with Opacity Mask into a Symbol, transform as usual, remove Symbol...take that chatGPT!

// rotate or move Object with Opacity Mask
// Carlos Canto - 8/10/2025
// select a single object with Opacity Mask before running
function main() {
var idoc = app.activeDocument;
var sel = idoc.selection[0];
var newSymbol = idoc.symbols.add(sel, SymbolRegistrationPoint.SYMBOLCENTERPOINT);
instance = idoc.symbolItems.add(newSymbol);
instance.position = sel.position;
selection = null;
instance.rotate(45);
//instance.translate (instance.width);
instance.breakLink(); // returns the original compound path inside a layer
newSymbol.remove();
var dup = selection[0];
var parent = dup.parent; // this is the layer that needs to be removed
dup.move (sel, ElementPlacement.PLACEBEFORE);
parent.remove();
sel.hidden = true; // hide for now, it could be removed if not needed
}
main()
Sign up
Already have an account? Login
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inSign in to Adobe Community
To post, reply, or follow discussions, please sign in with your Adobe ID.
Sign inEnter your E-mail address. We'll send you an e-mail with instructions to reset your password.
