AE ENHANCERS

Expressions/Scripts/Presets
It is currently Thu May 23, 2013 9:05 am

All times are UTC - 8 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: thisComp.layer(slider control).name - how?
PostPosted: Fri Oct 01, 2010 5:24 am 
Offline

Joined: Tue Jun 08, 2010 2:57 pm
Posts: 89
Probably very easy, but I haven't gotten it to work yet. I have a comp has a null with an slider control and a text layer with the "thisComp.layer(1).name" expression on the source text.

I would like to update the selected layer (1), via the slider control, but it won't let me do this with just parenting.

Tips?


Top
 Profile  
 
 Post subject: Re: thisComp.layer(slider control).name - how?
PostPosted: Fri Oct 01, 2010 6:50 am 
Offline
Enhancement master
User avatar

Joined: Thu Jun 17, 2004 9:27 am
Posts: 456
Location: New York City, NY
That is not possible via expressions. One workaround way to do it could be to have several layers and have the slider change the opacity of the layers to show and hide them.

-Lloyd

_________________
http://aescripts.com


Top
 Profile  
 
 Post subject: Re: thisComp.layer(slider control).name - how?
PostPosted: Fri Oct 01, 2010 7:15 am 
Offline

Joined: Tue Jun 08, 2010 2:57 pm
Posts: 89
Really? So I can't have a slider that changes the (1) value to (2) for example?


Top
 Profile  
 
 Post subject: Re: thisComp.layer(slider control).name - how?
PostPosted: Fri Oct 01, 2010 8:38 am 
Offline

Joined: Sat Jun 05, 2004 7:59 am
Posts: 646
Location: London, UK
I think this maybe what you're asking for:
Code:
slider = Math.floor(thisComp.layer("Null 1").effect("Slider Control")("Slider")); // ensure slider is an integer
slider = Math.max(1, Math.min(thisComp.numLayers, slider)); // ensure index is valid, clamped between 1 to numLayers
thisComp.layer(slider).name;


Top
 Profile  
 
 Post subject: Re: thisComp.layer(slider control).name - how?
PostPosted: Fri Oct 01, 2010 9:41 am 
Offline
Enhancement master
User avatar

Joined: Thu Jun 17, 2004 9:27 am
Posts: 456
Location: New York City, NY
Sorry, I misread your question. Paul's solution will work for you.

-Lloyd

_________________
http://aescripts.com


Top
 Profile  
 
 Post subject: Re: thisComp.layer(slider control).name - how?
PostPosted: Fri Oct 01, 2010 3:56 pm 
Offline

Joined: Tue Jun 08, 2010 2:57 pm
Posts: 89
That worked perfectly! Thank you for taking the time :)


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

All times are UTC - 8 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


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