Adobe 65009963 Scripting Manual page 174

After effects cs4
Table of Contents

Advertisement

Examples
Render named items
This script,
re n de rN am ed I tem s. jsx
their names and sends all such compositions to the render queue.
This script does the following:
Checks to see if a default string for rendering has already been set in the user preferences. If so, set this as a
user prompt. This is handy if you're always looking for the same string (for example, "FINAL" or
"CURRENT"). If not, we set a new
holder value for the string that will be entered by the user.
Display a prompt to the user asking for a text string to use.
Goes through the project looking for the text entered by the user, and checks if the item that contains that
text is a composition. Sends all matching compositions to the render queue.
If the user cancels, the text is undefined. Otherwise, saves the new setting in preferences, converting it to all
lowercase letters for consistency (although the search is not case sensitive).
Makes the Render Queue panel visible and bring it to the front, ready for the user to assign save locations
for the new render queue items.
New render locations
This script,
n e w R e n d e r L o c at io n s. js x
new render destination for them.
This script does the following:
Prompts the user for a new folder to use as a render destination.
Checks that the user entered a new location (and didn't cancel), then creates a loop for each selected render
queue item, and for each output module in it.
If an item is queued, gives the current render location a new name and location, and displays an alert stating
the new file path.
Smart import
This script,
s m art I m p o rt .j sx
It attempts to detect whether each item is a still, moving footage, or an image sequence. The user still has to
make other choices in dialog boxes, such as which layer of a multi-layer image (such as a PSD file) to import.
This script does the following:
Prompts the user for a folder whose contents are to be imported, and checks that the user chooses a folder
rather than cancelling.
Defines a function,
pr oc es sF ol d er ()
helper functions.
Defines a helper function,
regular expressions, which are a special type of JavaScript designed to reduce the number of steps required
to evaluate a string.
The first one tests for the presence of sequential numbers anywhere in the file name, followed by another
making certain that the sequential files aren't of a type that can't be imported as a sequence (moving image
files). The function then checks adjacent files to see if a sequence exists, stopping after we've evaluated ten
, finds compositions in the open project with a particular text string in
and
se c ti onNa m e
, allows the user to select queued items in the render queue and assign a
, allows the user to import the full, nested contents of a folder just by selecting it.
, to import each of the files in the chosen folder, which uses several
, to test whether a given file is part of a sequence. This uses
tes t ForS eq uence ()
in the preferences file, along with a place-
ke y N ame
Render named items
174
174

Advertisement

Table of Contents
loading

This manual is also suitable for:

Creative suite 3 after effects

Table of Contents