Creative COW SIGN IN :: SPONSORS :: ADVERTISING :: ABOUT US :: CONTACT US :: FAQ
Creative COW's LinkedIn GroupCreative COW's Facebook PageCreative COW on TwitterCreative COW's Google+ PageCreative COW on YouTube
ADOBE AFTER EFFECTS:HomeForumBasicsExpressionsTutorialsPodcastsAE TechniquesCreative Cloud DebateFAQ

x and y values does not match after applying an expression which shouldn't alter them

COW Forums : Adobe After Effects Expressions

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook
David Cabestanyx and y values does not match after applying an expression which shouldn't alter them
by on Mar 14, 2012 at 9:42:58 pm

I'm using the expression below to control de scale of a bunch of layers that are going to be sequenced, each layer has its in point two seconds after the previous one, the layer that they are referencing (my index+1) it's just a null with keyframed scale from 100 to 148% over 10 seconds. The layers are already scaled at 100% so I don't want them to get too big and pixelated, due to the sequencing I'm using a valueAtTime command in order to have them start later in time, but when I put the last value (to subtract it from the scale and prevent them to be too scaled up, it removes it on the x axis but not on the y, so the image becomes distorted. The original null controlling the scale is not distorted so I really can't understand why is getting distorted here.

Can anyone tell me what I'm doing wrong?
Thanks!



sizemaster = thisComp.layer(index+1).transform.scale.valueAtTime(time+1);
sizemaster-44;


Return to posts index
Reply   Like  

Dan EbbertsRe: x and y values does not match after applying an expression which shouldn't alter them
by on Mar 14, 2012 at 10:26:50 pm

Scale (for a 2D layer) is a 2-element array, and you're only subtracting 44 from the x value. Try it this way.

sizemaster = thisComp.layer(index+1).transform.scale.valueAtTime(time+1); sizemaster-[44,44];



Return to posts index
Reply   Like  

David CabestanyRe: x and y values does not match after applying an expression which shouldn't alter them
by on Mar 15, 2012 at 2:50:46 pm

Thanks a lot Dan, I ended up using a slightly different approach, but added up to the same. Your is a lot cleaner and concise.

Thanks again!

sizemasterx = thisComp.layer("opacity and scale ctrl").transform.scale[0]
sizemastery = thisComp.layer("opacity and scale ctrl").transform.scale[1];


[(sizemasterx-40),(sizemastery-40)]


Return to posts index
Reply   Like  

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
Share on Facebook


FORUMSTUTORIALSFEATURESVIDEOSPODCASTSEVENTSSERVICESNEWSLETTERNEWSBLOGS

Creative COW LinkedIn Group Creative COW Facebook Page Creative COW on Twitter
© 2014 CreativeCOW.net All rights are reserved. - Privacy Policy

[Top]