Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions I’m going crazy with something that i think is really simple [Reset anchors]

  • I’m going crazy with something that i think is really simple [Reset anchors]

    Posted by Vincenzo Imbimbo on July 31, 2023 at 9:53 pm

    Hello guys, i’m going crazy with something that i think is really simple but i don’t know how to achieve it, i’m trying to make a Script with a button that when you click it:

    1. The script will copy the original anchor point value of the selected shape layer’s “Transform” to the “Anchor Point” properties inside each content group.

    2. Then, it will reset the anchor point of the selected shape layer to [0, 0].

      Maybe someone has a better solution to what i’m actually trying to do, i’m trying to create an .ffx file with a little animation in the “position” of the layer, but i want to apply it to any layer no matter it’s position values. The problem is that the layer moves to the position of the .ffx file. So i was trying to make a script to reset all anchor points to [0,0] and create the .ffx animation in the “anchor point” property instead of the “position” property.

      I want to avoid using expressions.

      Anyone can point me in the right direction? Thanks

    Filip Vandueren replied 3 years, 1 month ago 2 Members · 1 Reply
  • 1 Reply
  • Filip Vandueren

    August 1, 2023 at 8:30 am

    Hi Vincenzo, here’s the approach I would take:

    – select everything that’s at the first level of the Contents of the shape layer,

    – execute the menu command for “Group Shapes” -> app.executeCommand(3741);

    This Group’s Position and AnchorPoint will both automatically have the same value as the layer’s anchorPoint.

    Now Set the Layer’s anchorPoint to [0,0], and also set the newly created Group’s Transform->Position to [0,0]

    I’m not that good with exact scripting syntax so I hope that sets you on the right course.

We use anonymous cookies to give you the best experience we can.
Our Privacy policy | GDPR Policy