Hi.
How can I create an expression on layer startTime ?
I have one layer with some keyframes in the opacity transformation; I dup this and I would to change with an expression his startTime.
Is it possible ?
Thanks
Expressing layer startTime
That's what .valueAtTime() is for. Apply it to whatever property you like and add an offset e.g. based on the layer index.blies wrote:Hi.
How can I create an expression on layer startTime ?
I have one layer with some keyframes in the opacity transformation; I dup this and I would to change with an expression his startTime.
Is it possible ?
Thanks
Mylenium
[Pour Mylène, ange sur terre]
Thanks Mylenium, but maybe I wrong my explanation.
What I want to achieve is something like this:
But alla layers are
Is it possible ?
What I want to achieve is something like this:
Code: Select all
|----------|
|----------|
|----------|
Code: Select all
|----------|
|----------|
|----------|
-
- Posts: 704
- Joined: June 5th, 2004, 7:59 am
- Location: London, UK
Expressions aren't able to actually change the start time for a layer. They can only affect the property on which they're applied, and there is no "start time" property. To do the equivalent of sliding the layers in the Timeline, you'd need a script.
But you can use the valueAtTime() expression to offset the values on any given property. For example, applied to an opacity property, this expression would offset any keyframed opacity values, based on the layer's index number.
opacity.valueAtTime(time - index);
Or you could use the pick whip to link to keyframes on another layer:
thisComp.layer("Control Layer").transform.opacity.valueAtTime(time - index);
If you enable time remapping on a layer, you can use the expression to offset the layer's source footage:
timeRemap.valueAtTime(time + index);
But you can use the valueAtTime() expression to offset the values on any given property. For example, applied to an opacity property, this expression would offset any keyframed opacity values, based on the layer's index number.
opacity.valueAtTime(time - index);
Or you could use the pick whip to link to keyframes on another layer:
thisComp.layer("Control Layer").transform.opacity.valueAtTime(time - index);
If you enable time remapping on a layer, you can use the expression to offset the layer's source footage:
timeRemap.valueAtTime(time + index);