Creative Communities of the World Forums

The peer to peer support community for media production professionals.

Activity Forums Adobe After Effects Auto centre Anchor point On a masked layer ?

  • Auto centre Anchor point On a masked layer ?

    Posted by Kurisuta Vd wilk on March 28, 2018 at 10:17 am

    Hi There,

    I have a lot of layers, which have different masked out parts.
    So the masked part is not the centre of the layer, but I want these parts with the anchor point in the middle.

    I know I can drag Y the anchor point, but than its not always EXACTLY in the middle,
    and it takes time for a lot of layers.

    Is there a way to do it Automaticallly ?
    Like auto centre for the whole layer : Control-Alt-Home,
    but now for a masked out part ?

    Thanks!

    Kurisuta Vd wilk replied 8 years, 4 months ago 3 Members · 4 Replies
  • 4 Replies
  • Steve Bentley

    March 28, 2018 at 6:38 pm

    I haven’t tried this but you could precompose each layer with its mask. Then use the same expression on each of the resulting precomp layers.
    The expression would get the width and height of each inner masked layer and then do some simple math to place the masked area at the center inside the precomp. The objects true anchor is still offset from the mask where it was, but because the masked area is now centered within the nested comp, the outer precomp layer would be centered, and have its anchor point in the center, and the object within would be centered to that. So the new anchor point is just the center of the outer comp.
    The only downside is that once all the expressions are on each layer, all of your “objects” would be centered and stacked in the outer comp.
    You could do this with one expression but it would be big and it might be easier to just copy and paste the same expression to all the layers.

    The other way would be to use an expression to get the width and height of each layer’s masked area and apply a null to the calculated center of that masked area and use the null as your “anchor”. That way none of the layers move from where they were and you can drag or rotate you masked area with the new nulls.
    There’s a bit of a snake chasing it’s tale in the last idea, so you might have to position the nulls with the expressions and then turn the expressions off (or delete them or convert expressions to key frames and then delete those) and link each layer to its newly positioned null using the parent picker.

  • Richard Garabedain

    March 28, 2018 at 6:53 pm

    Rap baby…RAP…REposition anchor point. It is a free plugin. Any which way you draw the mask this can center it or put it on the edge..even centers it with 3d objects which is very difficult otherwise.

  • Kurisuta Vd wilk

    March 30, 2018 at 2:12 pm

    Thanks for your reply ! It seems like these solutions could work, but is actually still a work around, with more steps than rather just move the anchor point by hand (with Y ). ( all be it that the centre is approximately )

    The script mentioned in the later reply is actually working very well ! So if you ever run into this problem, try it !
    Thanks for your effort though.

  • Kurisuta Vd wilk

    March 30, 2018 at 2:14 pm

    Thanks! I thought this script wouldn’t work on masks, but it is doing exactly what I was looking for!
    Thanks so much.
    ( Repositionanchorpoint @ AESCRIPTS )

    Merci!

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