Applying an expression just at exact layer time

Moderators: Disciple, zlovatt

Post Reply
ccf
Posts: 16
Joined: August 21st, 2008, 8:41 am

September 8th, 2008, 5:17 am

Hi:

How can I get control to any expression, in order to apply it in a layer or a group of layers, just in the time I decide, so I can switch on or off at taste, or maybe play with the expression parameters at different times.

Thanks
User avatar
Atomic
Posts: 157
Joined: April 30th, 2007, 5:55 am
Location: United States, Ohio

September 8th, 2008, 5:34 am

Here is how to set the source text of a text layer based upon the frame #.

Code: Select all

thisFrame=timeToFrames(t=time+thisComp.displayStartTime,fps=1.0/thisComp.frameDuration,isDuration=false);
if (thisFrame==0){text.sourceText = 'Hello World';}
If you want to apply something to a group of layers you may be able to apply the expression to an adjustment layer. Depends on what you want to do.
"Up And Atom

No...No

Up And At Them!"
ccf
Posts: 16
Joined: August 21st, 2008, 8:41 am

September 10th, 2008, 12:04 pm

Atomic:

I´m a beginneer in expressions, I dont understand how to do this.

What I need is to able or disable an expression applied to any layer, in order just to have the expression only in the moment I decide.

Thanks for your support

CCF
User avatar
Disciple
Posts: 137
Joined: June 5th, 2004, 8:05 am
Location: Los Angeles, CA
Contact:

September 15th, 2008, 3:58 pm

The easiest way to do this would be to use the Expression Controls (check the effects menu).
Depending on the type of data you expression is creating, or reading, you can easily controls its effects via keyframes.

Alex
User avatar
Atomic
Posts: 157
Joined: April 30th, 2007, 5:55 am
Location: United States, Ohio

September 16th, 2008, 12:06 pm

All you ave to do is add an else to the if statement.

Code: Select all

thisFrame=timeToFrames(t=time+thisComp.displayStartTime,fps=1.0/thisComp.frameDuration,isDuration=false);
if (thisFrame==10)
{
text.sourceText = 'This is frame #10 text.';
}
else
{
text.sourceText = "This is the default text."
}
"Up And Atom

No...No

Up And At Them!"
Post Reply