No, you cannot use these expressions on masks due to their compound keyframes. Depending on what the mask is actually used for, pre-composing it on a separate layer and using that layer as a matte with time-remapping will work.
Thanks for your reply Mylenium! I was afraid that was the case. I am not sure if what you suggest will work for me, I don't use AE that regularly so I tend to get a bit rusty on how certain things are done. I will have a look at it. But if anyone has an actual expression that simulates Cycle, don't be afraid to post it .... If all else fails I suppose I can always do copy/paste, but it's a bit awkward since the animation I am tracking is a looping one and it would be so convenient to use an loop expression, makes it easier for me to find the loop points of the animation I am tracking...
If you want to cycle an animated mask then just do as Mylenium suggested. If you're a bit rusty here is a step by step:
- Create a new solid and add it to your timeline
- Add your mask path
- Press Alt/Option + M to set the first keyframe for the mask (or click the mask path stopwatch
- Set the other keyframes you need for the mask path
- After you have set at least two keyframes for the mask move the CTI (current time indicator) down the timeline to the point where you want the animation to loop
- Select the first mask keyframe and copy and paste
- Move the CTI back one frame and note the CTI position or set a timeline marker
- Precompose the masked layer moving all attributes
- With out moving the CTI select Layer>Time>Enable Time Remapping or press Alt/Option + Ctrl/Cmnd + t
- Set a new keyframe for Time Remapping at the current time
- Delete the last keyframe for time remapping so you only have 2
- Add an expression to Time remapping by holding down the Alt/Option key and clicking the stopwatch press Shift + Alt/Option + = and type loopOut();
There you go. If you need to use the animated mask as a matte then use the pre-comp as a track matte. If you are using the animated mask for something else let us know and we will tell you how to do the work around. BTW, this will work for any property you want to animate that will not work with a loopOut() expression.
NOTE: If you want to use the default loopOut("cycle", 0) behavior you don't need to type anything in the brackets. The options inside the brackets are "cycle" and "pingpong" and if needed you can set the number of keyframes you want to loop
Thanks for the step by step Rick! I will have a look into it ....