selecting a project item when you don't know it's index

Find out why the . goes before the /

Moderator: Paul Tuersley

Post Reply
ScottG
Posts: 38
Joined: March 19th, 2006, 2:45 am

how would one go about selecting a project item when you don't know it's index?
i can see how to retrieve all items of a specific type, but i can't get the one i want because i can't seem to select it by name, which is pretty much the only thing way i can think of doing it.
as far as i can see, there's no such thing as app.project.item.name, meaning i can't do a for/while to find a compItem with matching name, and trying to retrieve
shadedComp.index
[given that shadedComp = myComp.layers.precompose(layerIndices, layerComp.name + " :: Shaded", false);]
doesn't work. :x
ScottG
Posts: 38
Joined: March 19th, 2006, 2:45 am

never mind, i pulled apart rd_compRenamer.jsx from redefinery.com and figured it out.

am just impatient to make progress, in the few hours it took me to work this out i was hoping for a quick answer from the forums. heh, guess you guys have more of a life than me.

i come from a PHP background, but even so I was never professional at that, as i'm a compositor not a programmer. this is slow going for me...
Post Reply