Page 1 of 1
opacity according to another layers time remap
Posted: November 30th, 2009, 5:31 am
by Ryberg
Hello expressioneers,
I tried to create an expression on a layers opacity to let it be controlled by another layers time remapping. It doesn't work, the layers opacity is constant 100 and I don't know why.
Code: Select all
if (timeToFrames(thisComp.layer("PigOnPlate_Eyes").timeRemap)==1) 0 else 100;
Re: opacity according to another layers time remap
Posted: November 30th, 2009, 5:46 am
by Mylenium
And your point exactly? All you are telling your layer is to be zero opacity at frame one, but otherwise always 100%. The rest is completely unclear since your description is far too vague to make any sense of it.
Mylenium
Re: opacity according to another layers time remap
Posted: November 30th, 2009, 6:29 am
by Ryberg
I set some held keyframes on the time remap layer, for example: 1, 2, 4, 3, 1, 2, 1, 4
What I want is for the other layer with the opacity expression, to be at 0% when time remap = 1 and 100% at all other time remap values.
Re: opacity according to another layers time remap
Posted: November 30th, 2009, 10:56 am
by kobyg
Make sure you give the TimeRemap value in frames and not in seconds,
Can't think of anything else that could go wrong.
I've tried your exact expression on my computer and it worked with no problem...
Koby.
Re: opacity according to another layers time remap
Posted: November 30th, 2009, 2:43 pm
by Ryberg
kobyg wrote:I've tried your exact expression on my computer and it worked with no problem...
Well, I can't seem to spot any errors in the expression either. Weird it's not working for me.
Re: opacity according to another layers time remap
Posted: November 30th, 2009, 3:09 pm
by kobyg
Upload the file and I will try help you spot the problem...
Koby.
Re: opacity according to another layers time remap
Posted: November 30th, 2009, 3:24 pm
by Dan Ebberts
It works for me too. You might try debugging by just using this part of the expression to see if you're getting the frame numbers you expect:
timeToFrames(thisComp.layer("PigOnPlate_Eyes").timeRemap)
Dan
Re: opacity according to another layers time remap
Posted: December 1st, 2009, 2:30 am
by Ryberg
thanks for the replies.
I tried the expression in a new project now, and it works fine.
I tried debugging yesterday using alert(); but that just made AE disable the expression.