Copy link to clipboard
Copied
Hey Guys,
So basically, I've created a Vignette script using cc spotlight. The only problem is, in order to link some expression between comps, I had to rename the main comp the vignette is being applied to.
Is there a way to get the name of a comp (the current item) and place it inside of an expression?
Here is a link to my script. It should make more sense when you check it out.
http://rapidshare.com/files/456403457/VB_Vignette3.jsx
Thanks for your help.
-Tyler
Copy link to clipboard
Copied
If you have access to the comp object, you should be able to just drop its name into the expression string, like this:
var myExpr = 'comp("' + myComp.name + '").layer("layer name")......etc.
Or am I missing something?
Dan
Copy link to clipboard
Copied
Yeah, that's the problem......
I need to get the name of the "active item" (a comp in this case) and use that name inside of an expression.
Any thoughts?
Thanks!
(Dan you're awesome!, love three d corner pin;)
Copy link to clipboard
Copied
If you're sure the active item is a comp, it should just be activeItem.name
Dan
Copy link to clipboard
Copied
Yeah, I figured out how to get the name of the comp, but getting that name inside of an expression is what is giving me trouble.
Copy link to clipboard
Copied
Are you saying you want the expression to resolve the name of the active item when it runs? That won't work.
If what you're trying to do is have the script resolve the name at the time the script runs and build that into the expression, then you'd do it the way I posted previously.
Dan
Find more inspiration, events, and resources on the new Adobe Community
Explore Now