AE ENHANCERS

Expressions/Scripts/Presets
It is currently Wed Jul 23, 2014 4:42 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: Finding out the scale of a layer with a parent
PostPosted: Mon May 26, 2008 8:25 am 
Offline

Joined: Fri Apr 04, 2008 4:28 am
Posts: 4
Anyone know how to do this? The layer space transforms (toComp, toWorld etc) seem to do this for position values but I can't find any way of finding a layer's absolute scale value. I'm trying to do a "world zoom" similar to the Videocopilot tutorial, so the highest-res layer when fully zoomed out is scaled about 0.01%. But using layer(index).transform.scale just gives its "internal" scale value which is 50%. I just wanted to try and cut down on render time by turning off any layers smaller than about 1% scale, but can't figure out how.

Thanks in advance

Nick


Top
 Profile  
 
 Post subject: Re: Finding out the scale of a layer with a parent
PostPosted: Mon May 26, 2008 9:10 am 
Offline

Joined: Sat Jun 26, 2004 10:01 am
Posts: 306
Location: Folsom, CA
Like this:

Code:
s = scale[0];
L = thisLayer;
while (L.hasParent){
  s = s*L.parent.scale[0]/100;
  L = L.parent;
}
s


Dan

_________________
http://www.motionscript.com


Top
 Profile  
 
 Post subject: Re: Finding out the scale of a layer with a parent
PostPosted: Mon May 26, 2008 10:41 am 
Offline

Joined: Fri Apr 04, 2008 4:28 am
Posts: 4
Genius. Thanks Dan!


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: Yahoo [Bot] and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group