3 Replies Latest reply on Jul 11, 2013 10:04 AM by badaboom_55

    Move/Translate GroupItem w/ masks and effects?

    badaboom_55 Level 1

      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.