Page 1 of 1

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

Posted: March 25th, 2006, 9:33 pm
by ScottG
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

Posted: March 25th, 2006, 10:41 pm
by ScottG
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...