Return-Path: Received: from atl4mhob05.myregisteredsite.com ([209.17.115.43] verified) by media-motion.tv (CommuniGate Pro SMTP 4.2.10) with ESMTP id 5095442 for AE-List@media-motion.tv; Tue, 04 Jun 2013 17:47:39 +0200 Received: from atl4webmail07 ([10.30.71.164]) by atl4mhob05.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id r54FvInN017985 for ; Tue, 4 Jun 2013 11:57:18 -0400 Received: from 75.51.169.28 (torno@sydefxink.com [75.51.169.28]) by atl4webmail07 (Netsol 11.2.30) with WEBMAIL id 6185; Tue, 04 Jun 2013 15:57:18 +0000 From: "David Torno" To: "After Effects Mail List" Importance: Normal Sensitivity: Normal Message-ID: X-Mailer: Network Solutions Webmail, Build 11.2.30 X-Originating-IP: [75.51.169.28] X-Forwarded-For: [(null)] X-Authenticated-UID: torno@sydefxink.com Date: Tue, 04 Jun 2013 15:57:18 +0000 Subject: Re: [AE] comp name expression MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit This should change all comps in your project to the name of the first layer. As long as there is at least one layer in the comp. I through an error catcher on it too just incase. /* Rename comp based on first layer name Request from Daniel Velez on AE-List ©2013 */ try{ var proj, totalItems, firstLayerName, compAry, totalComps; proj = app.project; totalItems = proj.numItems; //Grab all comps for(var i=1; i<=totalItems; i++){ curItem = proj.item(i); if(curItem instanceof CompItem){ compAry[compAry.length] = curItem; } } //Update comp names totalComps = compAry.length; app.beginUndoGroup("Change comp names"); for(var c=0; c 0){ compAry[c].name = compAry[c].layer(1).name; } } app.endUndoGroup(); }catch(err){ alert("Error at line #" + err.line.toString() + "\r" + err.toString()); } -- David Torno Visual Effects Artist and Supervisor http://www.ghosttownmedia.com david@ghosttownmedia.com O: 213.739.2290 C: 818.391.6060 ------------------------------------------------ http://www.sydefxink.com (main portfolio) http://aeioweyou.blogspot.com (vfx tutorials and AE scripts blog) http://mactex.blogspot.com (free textures blog) -----Original Message----- From: Daniel Velez [mailto:velez.daniel@gmail.com] Sent: Tuesday, June 4, 2013 08:46 AM To: 'After Effects Mail List' Subject: Re: [AE] comp name expression No im not in a hurry, that would be great! Thank you Dan On Tue, Jun 4, 2013 at 11:36 AM, David Torno wrote: > Expressions cannot change project item properties like name, width, > height, etc... This is where a script comes into play. If you are not in a > hurry, I can probably write one up for you as soon as I am at the office. > > > David Torno > Visual Effects Artist & Supervisor > http://www.ghosttownmedia.com > O: 213.739.2290 > C: 818.391.6060 > --------------------- > http://www.sydefxink.com > http://aeioweyou.blogspot.com > http://mactex.blogspot.com > > "The most useless day is that in which we do not laugh" > -Charles Field > > On Jun 4, 2013, at 7:59 AM, Daniel Velez wrote: > > > Hi Guys > > > > is there an expression that can name the comp automatically as the name > first layer on that comp? > > > > > > Dan Velez > > +---End of message---+ > To unsubscribe send any message to >