<p>At the moment parenting a mask or its vertices to another object like a null is not possible by default. Although it is <a href="http://blogs.adobe.com/aftereffects/2012/12/top-feature-requests-for-after-effects-in-2012.html" rel="nofollow noreferrer">one of the most wanted features</a>, probably there is no official solution for this. But in the same link you can find a link to a forum post where scripting master Dan Ebberts <a href="http://forums.adobe.com/thread/881618" rel="nofollow noreferrer">offers a solution</a>. This solution has some limitations though, yet it might work in your project.</p>

<p>My solution would be more manual, this is not the fastest way but it works. If you are using a text layer, try adding an animator for the opacity, based on the characters.</p>

<p><img src="https://i.sstatic.net/8uZHI.png" alt="Screenshot"></p>

<p>Then animate your cursor layer's position accordingly. Or better, parent it to a null and animate your null and use hold keyframes.</p>

<p>This option is better than animating a mask on text layers, as it reveals each character. In your screenshot, there is this situation that your letters are revealed as if a linear wipe is used.</p>

CC BY-SA 3.0
2012-12-05T21:17:27.777Z
Great help as always! Learned something new. Thanks Inan.
greener
CC BY-SA 3.0
2015-01-21T12:44:57.297Z
You can add another animator to the text for the character value. You can set it to force the character to be the | symbol, which is as close as spitting to the cursor symbol. See it in action here: https://www.youtube.com/watch?v=TwSm4keW8d0 (apologies for the music, that's what the producer wanted)
stib
CC BY-SA 3.0
2018-01-26T19:57:34.210Z
As of CC 2018, as mask vertices can now be controlled by expressions. In previous versions it is only possible through scripting.
stib
CC BY-SA 3.0
2012-12-05T08:26:29.727Z
2012-12-05T08:26:29.727Z
Inan
<p>I have this video whereby text is revealed one letter after another. A text cursor is moving along with each letter to simulate the fact of writing the text on a word processor.</p>

<p>I have separate animations for the text being revealed: a mask expands, for the cursor: the position. Keyframes are aligned and the animation is linear.</p>

<p>However, the cursor is overlapping the text at the start of the animation as you can see here:</p>

<p><img src="https://i.sstatic.net/evbit.png" alt="enter image description here"></p>

<p>I also tried adding a solid layer that moves with the text and hiding everything to the right of the cursor. That works except when the background is not a solid color as is my case.</p>

<p>So my question is if I can parent the mask's movement to the cursor, or vice-versa? Alternatively, is there a better way to do it?</p>

CC BY-SA 3.0
2012-12-05T08:40:26.757Z
If I understand you correctly, this problem shouldn't exist. The text cursor doesn't take any intermediate positions between letters. It is always stuck to the right edge of the latest character. You appear to have assigned a continuous translation to the cursor. Instead, make one frame jumps from old letter edge to new edge. Similar animation applies to the letter appearances themselves. Sorry for not tackling your Q. But, to answer it, "_When you want one layer to show through a hole in another layer, set up a [track matte](http://www.adobepress.com/articles/article.asp?p=1273353&seqNum=5)_"
Gyan
<after-effects><animation-rendering>
How to parent a mask to another element in AfterFX?
greener
# How to parent a mask to another element in AfterFX?

(Asked by: username_0 on 2012-12-04)

I have this video whereby text is revealed one letter after another. A text cursor is moving along with each letter to simulate the fact of writing the text on a word processor.

I have separate animations for the text being revealed: a mask expands, for the cursor: the position. Keyframes are aligned and the animation is linear.

However, the cursor is overlapping the text at the start of the animation as you can see here:

![enter image description here](https://i.sstatic.net/evbit.png)

I also tried adding a solid layer that moves with the text and hiding everything to the right of the cursor. That works except when the background is not a solid color as is my case.

So my question is if I can parent the mask's movement to the cursor, or vice-versa? Alternatively, is there a better way to do it?

**Tags:** after-effects, animation-rendering

> **Comments:**
> **username_1**: If I understand you correctly, this problem shouldn't exist. The text cursor doesn't take any intermediate positions between letters. It is always stuck to the right edge of the latest character. You appear to have assigned a continuous translation to the cursor. Instead, make one frame jumps from old letter edge to new edge. Similar animation applies to the letter appearances themselves. Sorry for not tackling your Q. But, to answer it, "_When you want one layer to show through a hole in another layer, set up a [track matte](http://www.adobepress.com/articles/article.asp?p=1273353&seqNum=5)_"  

---

## 1 answers

### Answer by username_2 on 2012-12-05. Score: 4 | Accepted answer

At the moment parenting a mask or its vertices to another object like a null is not possible by default. Although it is [one of the most wanted features](http://blogs.adobe.com/aftereffects/2012/12/top-feature-requests-for-after-effects-in-2012.html), probably there is no official solution for this. But in the same link you can find a link to a forum post where scripting master Dan Ebberts [offers a solution](http://forums.adobe.com/thread/881618). This solution has some limitations though, yet it might work in your project.

My solution would be more manual, this is not the fastest way but it works. If you are using a text layer, try adding an animator for the opacity, based on the characters.

![Screenshot](https://i.sstatic.net/8uZHI.png)

Then animate your cursor layer's position accordingly. Or better, parent it to a null and animate your null and use hold keyframes.

This option is better than animating a mask on text layers, as it reveals each character. In your screenshot, there is this situation that your letters are revealed as if a linear wipe is used.

> **Comments:**
> **username_0**: Great help as always! Learned something new. Thanks username_2.  
> **username_3**: You can add another animator to the text for the character value. You can set it to force the character to be the | symbol, which is as close as spitting to the cursor symbol. See it in action here: https://www.youtube.com/watch?v=TwSm4keW8d0 (apologies for the music, that's what the producer wanted)  
> **username_3**: As of CC 2018, as mask vertices can now be controlled by expressions. In previous versions it is only possible through scripting.  

---

