Page 1 of 1

Selecting Certain Comps based on part of the name

Posted: September 17th, 2014, 4:00 pm
by Amaylayinsues
I'm trying to select all comps in a project besides one that ends with "assemble" tagged onto the end of it. I've been able to use David Torno's code for most of the things I've been looking to do, but this is a bit out of my depth currently. What I'm doing is using the Create ProEXR from the file menu. It then creates a folder with all the EXR layers broken into comps and a master comp with the suffix assemble. So depending on what the EXR is named from 3D, Cloud_DYN_ShoeBTY.EXR becomes a comp called Cloud_DYN_ShoeBTY assemble.

I'm trying to find a way to select every comp but the one with _assemble in the name and then also be able to select only the comp with _assemble in the name.

Code: Select all

function retrieveProjectItems(itemType){

   var typeOptions = new Array("Composition", "Folder", "Footage");
    for(var t = 0; t<3; t++){
        if(itemType == typeOptions[t]){
            var proj, itemTotal, curItem, itemArray;
            itemAry = new Array();
            proj = app.project;
            itemTotal = proj.numItems;
            for(var i = 1; i <= itemTotal; i++){
                curItem = proj.item(i);
                if(curItem.typeName == itemType){
                    itemAry[itemAry.length] = curItem;
            return itemAry;

var results = retrieveProjectItems("Composition");

for(var r=0; r<results.length; r++){
Any help with this would be greatly appreciated.