Page 1 of 1

How do I pair a layers "Y Rotation" to a Control Layer?

PostPosted: 08/2/2017, 11:15 pm
by varxtis
Im trying to do a tile flip reveal animation where it starts as just a white screen, but then hundreds of hexagons flip/rotate over to reveal an image. Im trying to control a Null Objects "Y Rotation" using a control layer. The control layer is a precomp of a basic linear wipe. The original tutorial I followed explains it's use with regard to the Null Objects scale, and it works great. But I need it to effect the Y Rotation instead of the scale. Here is the expression I used:
Code: Select all
sourceLayer = thisComp.layer("Hex Control Layer");

sampleSize = [1,1];

samplePoint = transform.position;

colour = sourceLayer.sampleImage (sampleSize.samplePoint);

x=colour[0]*100

[x,x]

Its the last line, the [x,x] that seems to be the issue, but I cant figure out what it's supposed to be.
Can someone fill me in?

Re: How do I pair a layers "Y Rotation" to a Control Layer?

PostPosted: 08/3/2017, 8:27 am
by JPT7505
Can't you just pick whip it (y rotation) to the control layer?

Re: How do I pair a layers "Y Rotation" to a Control Layer?

PostPosted: 08/3/2017, 9:21 am
by varxtis
I can, but unless Im missing something (which could be very likely), all that does is tell the null object that the control layer is suppose to make the null object do something. It doesn't tell null object what or how. I don't this identifying the source layer is my issue. Its something thereafter thats the issue. But again, I could very well be wrong. And be be on the safe side, I did make sure to try your suggestion a few times in a few different ways.

Re: How do I pair a layers "Y Rotation" to a Control Layer?

PostPosted: 08/3/2017, 5:42 pm
by JPT7505
Exactly, that's what the control layer is for, for control. So that layer has to have keyframes or an expression that feeds whatever is attached to it.

Re: How do I pair a layers "Y Rotation" to a Control Layer?

PostPosted: 08/3/2017, 7:25 pm
by varxtis
I hear ya...
yes, the source layer itself is animated, with a black to white linear wipe. Keep in mind, as I said, I already did this to the scale property and it worked just like I needed. But I decided to change how the tiles animate in, Rotate instead of grow. Heres the tutorial I followed
https://www.youtube.com/watch?v=4OQN2mHQuD0