Quantcast
Channel: Adobe Community : Popular Discussions - Illustrator Scripting
Viewing all articles
Browse latest Browse all 12845

Move/Translate GroupItem w/ masks and effects?

$
0
0

All,

 

I have a document with a single layer and a single group (GroupItem) in that layer.

Unfortunately, I didn't create the .ai file, so I don't know exactly what is in the group; however, there appears to be a bunch of complex clipping masks and gradient effects, etc. deeply nested within it.

I've successfully scripted a few tasks like resizing the group with no ill effect... in other words, this works as expected:

 

app.activeDocument.activeLayer.pathItems[0].resize(50,50);

 

However, as soon as I try to move/translate/reposition the group, all the effects/masks seem to go wonky, I've tried all of the below with no success (200 is just arbitrary as a test):

 

app.activeDocument.activeLayer.pathItems[0].left = 200;
app.activeDocument.activeLayer.pathItems[0].translate(200,0);

 

I have no problem moving the group around on the document with my mouse... all the effects/masks are still nice and clean, so I'm confused as to why I can't do the same thing via JavaScript.


Viewing all articles
Browse latest Browse all 12845

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>