[Help] Path Expression transform

Community Beginner ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

I want to make a mask that references a path elsewhere.
But after I whip linked it, the position of the mask is off.
I tried to use expression to move the points of the mask path, except I cant find the proper function to do that.
Im new and self taught, help.

Screenshot 2022-06-17 at 3.45.35 PM.png

TOPICS
Expressions

Views

40

Likes

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

Adobe Community Professional , Jun 17, 2022 Jun 17, 2022

Shape layers can be weird as they have two sets of coordinates (sort of).  There's the corrdinates of the shape layer itself, then each shape in a layer has its own transform points.  That's my guess as to why the position is not aligned.

 

The challenge you've sound interesting, but it might be there's an easier way to tackle it.  I'm guessing again, but are you trying to use a mask to only show part of a layer?  Track Mattes might be a simpler approach.  You can use the shape layer to cut out

...

Likes

Translate

Translate
Adobe Community Professional ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

Shape layers can be weird as they have two sets of coordinates (sort of).  There's the corrdinates of the shape layer itself, then each shape in a layer has its own transform points.  That's my guess as to why the position is not aligned.

 

The challenge you've sound interesting, but it might be there's an easier way to tackle it.  I'm guessing again, but are you trying to use a mask to only show part of a layer?  Track Mattes might be a simpler approach.  You can use the shape layer to cut out the section of a layer below.

 

 

Likes

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 Beginner ,
Jun 17, 2022 Jun 17, 2022

Copy link to clipboard

Copied

LATEST

Yea, I worked around the issue with Mattes.
For those who are interested, my later experimentations in using expressions worked when I modified to this:

 

mask1=thisComp.layer("Shape Layer 1").content("Shape 1").content("Path 1").path;
//transform
newmask=[];
for (i=0; i<mask1.points().length;i++){
offsetX=thisComp.layer("Controller").effect("Slider Control")("Slider");
offsetY=thisComp.layer("Controller").effect("Slider Control 2")("Slider");
value = mask1.points()[i];
value=value+[offsetX,offsetY];
newmask.push(value);
}

//create path
mymask=mask("Mask 1").path;

mymask=createPath(newmask,mask1.inTangents(),mask1.outTangents(),true);

Likes

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