Quantcast
Channel: Adobe Community : Popular Discussions - After Effects Expressions
Viewing all articles
Browse latest Browse all 47983

Complex Scale Expression help

$
0
0

Hey guys,

I'm trying to create an effect using an expression because I want to apply this to multiple layers.


Basically what I want to achieve might be very simple, but I just can't figure it out- I'm rather new to expressions.


This is it-


If Null1 Scale grows, Comp 1 Scale Grows & comp 2 (3,4,5...) scale decreases.

So what I tried to do is the following:

I picked wip comp 1 to null 1, so that works.


Then I pick wipd comp 2's scale -> to Null 1 Scale, and add this expression:


(thisComp.layer("Null 1").transform.scale)-((thisComp.layer("Null 1").transform.scale)/10)

And that make this- Null1 100,100 -> Comp 1 is 90,90


Well That made sense to me, but it's not working and I have another problem.

I don't want comp 1's size to be null 1's size and from the scale down.


I want comp1's size to stay it's original size (10,20) and from that decrease the correct percentages in relation to null1 scale up or down.


So I thought maybe something like this will work.. I was wrong again..


if ((thisComp.layer("Null 1").transform.scale)>(100,100))
{
transform.scale((thisComp.layer("Null 1").transform.scale)-((thisComp.layer("Null 1").transform.scale)/10)
}


I hope I haven't complicated things to much for you to understand! I tried to simplify my thoughts.

Once I have that code I can apply it on more nulls.


(you some times see this kind of effect in websites


Thanks for your time and help!


Viewing all articles
Browse latest Browse all 47983

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>