FORUMS: list search recent posts

Rotation Expression keyframes need to be removed

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Kelvin Chong
Rotation Expression keyframes need to be removed
on Jul 1, 2013 at 2:27:18 am

So I tried searching the entire net for an answer and could not find it.

What I'm trying to do is come up with a script. Let me explain that

Imagine a clock with the 12 hours marker only.
I have a master layer (a line) that I animated the rotation (full 360)
Then I want to have an expression that will automatically as I duplicate layers to divide the angles and stop them equally but still rotate the initial degrees

I'm sure I'm not making sense, let me try that again.

Assume there is layer 1 that rotates 360deg of a clock.
Then suppose I have 3 other layers that I want them to rotate together with the first layer but they will stop their rotation in such a way that the angle between them is equal. I'm putting the code here.

As of now, it works only if all the layers are animated. I want to be able to remove the keyframes from the other layers. Is that possible?

I'm just starting expressions so this might be very rudimentary.

test=(360/thisComp.numLayers)
if (rotation < test*(index-1)){
value
}else{
test*(index-1)
}


Return to posts index

Dan Ebberts
Re: Rotation Expression keyframes need to be removed
on Jul 1, 2013 at 4:09:01 am

I think you were close:

test=(360/thisComp.numLayers);
if (rotation < test*(index)){
value
}else{
test*(index-1)
}


Dan



Return to posts index

Kelvin Chong
Re: Rotation Expression keyframes need to be removed
on Jul 1, 2013 at 4:56:11 am

Hi Dan, thanks for the reply but the code you gave me does not work properly,

I have 3 layers now,
one is the master which I animated rotation 1 full revolution.
Then I duplicated the layer and added the expression I did so that no matter how much I duplicated it would always divide the angles between them equally and still rotate until that degree.

But all the slave layer still have the keyframe animation to it, which I wanted to know if it was possible to remove?

http://imgur.com/pNtmJaJ
It's a picture of what I'm trying to do.


Return to posts index



Dan Ebberts
Re: Rotation Expression keyframes need to be removed
on Jul 1, 2013 at 5:38:13 am

If layer 1 is your master, then the others shouldn't need the keyrames with this:

test=(360/thisComp.numLayers);
r = thisComp.layer(1).rotation;
if (r < test*(index-1)){
r
}else{
test*(index-1)
}


Dan



Return to posts index

Kelvin Chong
Re: Rotation Expression keyframes need to be removed
on Jul 1, 2013 at 5:52:56 am

Awesome it worked :D
I guess that's why you are so famous Dan,
Thanks a lot


Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2017 CreativeCOW.net All Rights Reserved
[TOP]