Copy link to clipboard
Copied
Hellos,
Currently got an issue when trying to step artwork.
This doesn't always happen but when it does, it can be a pain
Here is the breakdown of the layers:
Here is what happens when i use the object.translate(x, y) function:
Gyazo - a240e5de488c00c087820eb94ad1b500.gif
and here is what happens when i change the position using object.position[x, y];
Gyazo - 5ccbe3e644e3648db674f2ac0ccaa5b0.gif
.ai file and the .jsx file i used for testing:
If you try to click the original object, you won't be able to click to the image thats on top when you ungroup the artwork.
Cant see any attributes in the panels that might show when this happens or what might help.
Anyone had similar experiences?
Originally the object was in a bigger clipping mask (so should be all clipped up) and all the other objects were doing what they should but all the other duplicated objects would not display the shadow object.
Kind regards
Ben Mason
check out moluapple's and Silly-V's dirty workarounds
Copy link to clipboard
Copied
can you share the actual file? or at least create another file with the same kind of properties if there's some confidentiality issues with sharing the original file?
It's hard to look at a gif and see what's going on.
Copy link to clipboard
Copied
Thanks for the reply, on the initial post there is a WeTransfer link containing the script and .ai file i was using in my tests
Copy link to clipboard
Copied
woops. turns out i'm dumb and/or illiterate. lol. i'll take a look
Copy link to clipboard
Copied
No worries, thank you for having a look. Not sure if i'm missing something pretty simple or if it is something going on with the object itself.
Hopefully you can see something im missing.
Also, to add to my lil report.
If you go to Object > Flatten Transparency and then keep the 'Preserve Alpha Transparency ticked, the script will work fine.
Must be the make up of the object somehow
Copy link to clipboard
Copied
bummer. i can't get to that link from behind my firewall
If you can share it on google drive or dropbox, i can get to it.
Copy link to clipboard
Copied
Try this
Copy link to clipboard
Copied
Hmm. it appears that when you make an opacity mask between a raster image and a pathItem, even though they are a part of the exact same object, in fact the layers panel shows that it's a simple path item (i was able to recreate the exact items you had in your test file without any clipping masks or groups), when you move that item, the path moves and the image is left behind.
You can test this by releasing the opacity mask after the move. and you'll see the image is in the exact same place as it was.
I don't know how to overcome that... I peered through the properties of the path item and i can't see anything relating to the opacity mask or the image itself... =(
Copy link to clipboard
Copied
I thought this might be the case i had a look through the js doc and couldnt find anything of use either,
just going to have to keep my eye out in the future and if i see anything missing (could be tricky at times) just have to go back and do the flatten transparency trick. Not going to be able to do it all the time as flattening the transparency removes overprints and named colours D:
Thank your time to look at this issue, appreciate it!
Copy link to clipboard
Copied
check out moluapple's and Silly-V's dirty workarounds