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

Putting Null Onto Motion Path Without copy/paste

Contributor ,
Feb 11, 2018 Feb 11, 2018

Copy link to clipboard

Copied

Hi,

I have a curve (shape).  I would like to use the new script to move the points of the shape around using nulls.  I would then also like to assign another null to the curve to use as a motion path.  I do NOT want to copy and paste the shape of the path into the position of my null as I want to use the changing shape of the curve to drive the motion of the null.

In Maya, I would assign an object to a curve as a motion path, and then it would move linearly across that path as time went on (or I could adjust the shape).  Is there any way to do something similar here?

All my googling just turns up "make a shape and then copy and paste it into the position" which is not what I want to do, as the curve shape will change, either over time, or as a user changes the position of the nulls.

Any ideas?

Thx!

Views

328

Translate

Translate

Report

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

correct answers 1 Correct answer

Contributor , Feb 11, 2018 Feb 11, 2018

Finally, just discovered the pointOnPath method in this document: Expression and Scripting Improvements in After Effects CC (October 2017).pdf

That will do it.

myPath = thisComp.layer("Shape Layer 1").content("Shape 1").content("Path 1").path;

myValue = toComp(myPath.pointOnPath(time));

[myValue[0],myValue[1]];

Votes

Translate

Translate
Contributor ,
Feb 11, 2018 Feb 11, 2018

Copy link to clipboard

Copied

LATEST

Finally, just discovered the pointOnPath method in this document: Expression and Scripting Improvements in After Effects CC (October 2017).pdf

That will do it.

myPath = thisComp.layer("Shape Layer 1").content("Shape 1").content("Path 1").path;

myValue = toComp(myPath.pointOnPath(time));

[myValue[0],myValue[1]];

Votes

Translate

Translate

Report

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