Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Anchor point moving expression

New Here ,
Dec 29, 2018 Dec 29, 2018

Hi, is there a way to set the anchor point to the top of the shape?

(screenshot explanation)

The "LINE" layer is a shape layer (rectangle) that change sizes in relation of how many text lines there are.

With the scale, I want to replicate the trim path effect of a stroke to a rectangle, so its anchor point has to be on the top of the shape.

So I ask you if there is an expression or an option to set the anchor point in a specific point of the shape (that can change sizes).

Thanks a lot

Screenshot 2018-12-29 at 11.10.16.png

This is the old animation with a stroke

TOPICS
Expressions
3.4K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 01, 2019 Jan 01, 2019

Hi,

the easiest way to achieve this is using the Anchor Point Controls of Pins & Boxes, see this tutorial

If you want to write your own expression, to place the anchor at the top left corner, for example, you can write

var sourceRect = sourceRectAtTime(time);

[sourceRect.left,sourceRect.top]

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 02, 2019 Jan 02, 2019

Thanks a lot.

But with this expression I can only put the anchor point on the top left corner of the shape.

How can I put it in the center top and how can the anchor point itself change position in relation of where I put the shape layer?

In my case I want the anchor point to always be in the center top of the shape even if I had to move, scale etc my object

Thanks

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Jan 02, 2019 Jan 02, 2019

The expression to always keep it at the top center will be

var sourceRect = sourceRectAtTime(time);

[sourceRect.left+sourceRect.width/2,sourceRect.top]

And again - if you don't want to write your own expression, for any other location you can always use the anchor controls of Pins & Boxes.

Mathias Möhl - Developer of tools like BeatEdit and Automation Blocks for Premiere Pro and After Effects
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Enthusiast ,
Jan 04, 2019 Jan 04, 2019
LATEST

Page 91-92 in "Making MOGRTs".
Free eBook on Making MOGRTs - PremierePro.net

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines