Activity › Forums › Adobe After Effects Expressions › Slate from Project Name
-
Slate from Project Name
Posted by Steve Kellener on June 19, 2014 at 6:30 pmAE CS5
In the “Output To” pulldown you can specify using the After Effects [projectName] for your file name to render. Is there a way to hook that same name to a text layer and generate a slate?
Steve Kellener replied 11 years, 10 months ago 2 Members · 2 Replies -
2 Replies
-
Declan Smith
June 19, 2014 at 9:53 pmThe only way is I know of is to use an ExtendScript as the project name is not available using expressions.
Below is a simple extend script that will set the currently selected text layer to the base name of the after effects file. Add this to a file called SetProjectName.jsx and save it to the Scripts directory. Within AE, select scripts -> run a script and select the script.
var comp = app.project.activeItem;
if ( comp && comp instanceof CompItem && comp.selectedLayers.length == 1) {
var selectedlayer = comp.selectedLayers[0];
if (selectedlayer instanceof TextLayer) {
selectedlayer.sourceText.setValue(app.project.file.toString().replace(/\\/g,'/').replace( /.*\//, '' ));
}
}Declan Smith
https://www.madpanic.tv
After Effects CS6/ FCS3 / Canon XLH1 / Canon 7D / Reason / Cubase“it’s either binary or it’s not”
-
Steve Kellener
June 20, 2014 at 10:56 pmThank you Declan. I made a text layer, selected it and tried the script and get an error. I wanted to just try and automate this so it simply pulls the name from the output name file (which is based on the project name). Scripting is already a bit beyond me so if the project name is not even available then I guess it won’t work. Amazing that there’s no built-in tool that can do this by now. Thanks again for your help.
—
Steve KellenerDigital Compositor
Titmouse, Inc.
Reply to this Discussion! Login or Sign Up