1 person found this helpful
I've gone through this dozens of times on this forum. To guarantee success you need to set a keyframe. Here goes:
- Select your Shape (Rectangle 1) and right click and select convert to Bezier Path
- Open the Rectangle 1 path and set a keyframe
- Select the layer that you want to add a mask to
- Choose the pen tool
- Click anywhere on the layer to set the first vertex
- If you are attempting to put a mask on a shape layer you must reset the Pen Tool to create a mask instead of a new shape before you set the first vertex
That's it. Works every time. The only problem is that the layer you are adding the mask to must be at the default transformation position and the shape layer you copied from must also be at the default transformations. Do that and everything works every time.
Thankyou this has been driving me mad all afternoon - the keyframe bit is the one missing piece of the puzzle..
However, there is one last thing for me to solve before I have a complete solution to this, and that's that the pasted mask is offset from the original.
I'm pasting within the same shape layer, and trying to figure out why this offset is happening - give it a go with a fresh comp, draw a rectangle, convert the path to a bezier, create a keyframe, copy the keyframe, create a point with the pen tool to create a mask,then ctrl+v to paste it. Weirdly, when I just tried it, the offset was in a different direction/amount to when I was trying to do it in my actual project.
Also, if I create the mask layer and click off it, (ie I pake the maske before I click the keyframe) I find that when I paste the keyframe it creates a new group with the shape, rather than copying the path to the mask. This seems to be the same no matter whether I have the path or the mask component selected.
The mask is offset from the original because path are drawn on layers using layer space but pasted using comp space. Select the layer you are coping from and press the U key twice. If any of the Transform properties show up like scale, rotation, position.. then you have to reset them so the layer is centered. Then select the layer you are going to past to and do the same. If everything is at the default position, scale and rotation the paths will match. If they are not then the paths won't. Simple as that.
Ah yep got it - I think what is possibly confusing is that the origin for a new shape is in the centre of the composition, rather than the centre of the shape, which seems a bit weird..
Thanks for the help
You can find everything that is not at the default values by selecting the layer and pressing the U key twice. Rectangle position is an important thing to check.
Okay, like I say, the anchor point of the shape being at the centre of the comp regardless of where I've drawn the shape is what threw me.
Luckily, it seems they've not long implemented a hand way of resetting the anchor point to the centre of a shape:
Hmmm actually that doesn't really solve what I'm trying to achieve here - If I use the above shortcut to move the origin to the center, the transform of the rectangle is not a 0,0.. This does not make sense to me..
So if I want to correct the transform of the path (in my mind, making a path on a shape should by default put it at 0,0 relative to the shape layer's position, I'd be grateful for an explanation of why it works this way), I need to change the transform of the path to 0,0 and then do the opposite transformation to the layer itself in order to move the path back to its original position... ...ugh...