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

How to get a maskPath.points() using valueAtTime()?

Enthusiast ,
Apr 14, 2023 Apr 14, 2023

Copy link to clipboard

Copied

Trying to achieve this:

thisMaskPath = thisComp.layer("LayerName").mask("Mask 1").points()[0][0].valueAtTime(0);
//or
thisMaskPath = thisComp.layer("LayerName").mask("Mask 1").points()[0].valueAtTime(0);
//or
thisMaskPath = thisComp.layer("LayerName").mask("Mask 1").points().valueAtTime(0);


All the above throw an error

The following:

thisMaskPath = thisComp.layer("LayerName").mask("Mask 1").valueAtTime(0);

returns an object, but then the following throw errors

thisMaskpath.points()[0][0];
thisMaskpath.points()[0];
thisMaskpath.points();



TOPICS
Expressions

Views

325

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

Community Expert , Apr 15, 2023 Apr 15, 2023

points() takes time as a parameter. Like:

p = thisMaskPath.points(0);

Votes

Translate

Translate
LEGEND ,
Apr 14, 2023 Apr 14, 2023

Copy link to clipboard

Copied

Masks never worked with valueAtTime() due to their compound keyframes. You may need to create Null objects to control the points and mangle those with expressions rather than the mask itself.

 

Mylenium

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
Community Expert ,
Apr 15, 2023 Apr 15, 2023

Copy link to clipboard

Copied

points() takes time as a parameter. Like:

p = thisMaskPath.points(0);

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
Enthusiast ,
Apr 15, 2023 Apr 15, 2023

Copy link to clipboard

Copied

LATEST

Thanks Dan.  Brilliant.... as always.

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