Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Expressions Expression for finding center of an object?

  • Expression for finding center of an object?

    Posted by Dane Cannon on November 11, 2010 at 7:49 pm

    I’ve run a script that readjusts the anchor point to the center of an object (based on an alpha layer, I think), but it also aligns all the layers along the x or y or z axis (DistributeLayers). I need to retain the objects position, but just change the anchor point. I’m importing text layers with each letter being a different layer. The actual size of the object is the size of the comp (so that they retain their spacing and position from Illustrator), so unfortunately their anchor point is the center of the composition. The repositionAnchorPoint script also unfortunately seems to use the size of the imported object. There’s got to be a way to do this using the alpha channel, can anyone point me in the right direction?
    Thanks
    Dane

    Dane Cannon replied 15 years, 5 months ago 2 Members · 2 Replies
  • 2 Replies
  • Chris Wright

    November 13, 2010 at 4:36 pm

    i think maltannon has a free plugin that does that

    https://technicolorsoftware.hostzi.com/

  • Dane Cannon

    November 16, 2010 at 5:35 am

    He does, but it doesn’t play nice with CS5… well, the freebie doesn’t at least, and the paid for version isn’t out yet. I would use this all the time though, for when I import text by character, or objects in their original comp settings to retain position. I think though that there’s a way to export from PS that retains the position, and crops it though… Or importing? I figured it out. I think it’s just importing as a composition and selecting ‘retain composition size.’

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