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

Reading length of a motion path

Engaged ,
Feb 21, 2019 Feb 21, 2019

My end goal is to determine the length or total distance traveled of a layer's motion path. Before I abandon my current approach, I wanted to find out if I'm missing anything that I may be able to leverage given the new Path properties and functions introduced in CC18.

So far it doesn't look like there is a method in place for this because the motion path itself does not appear to be exposed to expressions - unlike an actual shape path, which can be referenced as a property of that Shape layer or Mask. The methods for referencing "Points" along those paths seams pretty well documented.

Figured I'd ask, thanks!

Stephen

TOPICS
Expressions
565
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
LEGEND ,
Feb 22, 2019 Feb 22, 2019
LATEST

You're not missing anything. Since the path itself isn't necessarily persistent and can be modified by other parameters, there's no built-in way to glean its length so far. You have to write your own code. The simplest way would be to use valueAtTime() and integrate the position difference between frames. Of course feel free to re-create the entire Bèzier formula if you need ultimate precision and feel inclined.

Mylenium

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