Activity › Forums › Adobe After Effects Expressions › scripting : creating comp
-
Dan Ebberts
February 22, 2011 at 1:32 amI don’t think you can get there that way. For one thing, missingFootagePath is an attribute, and doesn’t accept any parameters.
I think you need to create a new file object that points to your replacement file by first building the new path based on the new folder and old file name. Once you have the file object created, you should be able to just:
myFile[0].replace(your_new_file_object);
Something like that.
Dan
-
Nicholas Joseph
February 22, 2011 at 7:28 pmOh I see.. That did work but its a little heavy on the memory. I have over a 100 layer. 🙂
So there’s no other way to change the file path of a selected footage?
Thanks for all your help Dan.
-
Nicholas Joseph
March 2, 2011 at 9:19 pmhi Dan…. I was wondering if there is away to get the mouse position and feed it into a expression. I’m trying to get the X and Y position of the cursor and have a solid/Null/text layer follow the cursor around interactively.
any tips tricks or a direction to headin would be greatly appreciated.
-
Nicholas Joseph
July 14, 2011 at 6:02 pmhiya dan! 🙂
I have a quicky question for ya…
Do you how i might be able to select a comp through a script….and toggle select.i tried _MMFolder.item(each).selected = true; but it doesn’t work.
-
Dan Ebberts
July 14, 2011 at 6:37 pmAre you trying to make a particular comp active in the UI?
If so, the only way I know is to use a hack that I think Lloyd Alvarez came up with:
theComp.workAreaDuration = 0.06;
theComp.ramPreviewTest(“”,1,””);
theComp.workAreaDuration = duration;Dan
-
Dan Ebberts
July 14, 2011 at 6:50 pmIf all you want to do is to select items in the project bin, something like this works:
{
for (var i = 1; i <= app.project.numItems; i++){
app.project.item(i).selected = true;
}
}
If you want to actually open a comp, you have to use the hack I mentioned previously.
Dan
-
Nicholas Joseph
July 14, 2011 at 8:03 pmapp.project.item(i).selected = true;
worked perfectly!!! Thanks!! -
Nicholas Joseph
July 27, 2011 at 3:42 pmHI hI HI !! 🙂
Does anyone know how to change the label color of a item.
I’m referring to the LABEL in the Project window and not the layers. Im trying to change the color to green after a comp has been processed and red if it was skipped.thanks
NIK
Reply to this Discussion! Login or Sign Up