77范文网 - 专业文章范例文档资料分享平台

After_Effects_CS6_Scripting_Guide(AE脚本参考书)(4)

来源:网络收集 时间:2019-04-14 下载这篇文档 手机版
说明:文章内容仅供预览,部分内容可能不全,需要完整文档或者需要复制内容,请下载word后使用。下载word有问题请添加微信号:或QQ: 处理(尽可能给您提供完整文档),感谢您的支持与谅解。点击这里给我发消息

After Effects scripting referenceGlobal functions

16

isDuration

Optional. When true, the time is a duration (measured from frame 0). When false (the default), the time is measured from the project’s starting frame.

Returns

String in the project’s current time display format.

write() global function

write(text)Description

Writes output to the Info panel, with no line break added.

ParameterstextReturns

The string to display. Truncated if too long for the Info panel.

Nothing.

Example

write(\write(\

writeLn() global function

writeLn(text)Description

Writes output to the Info panel and adds a line break at the end.

ParameterstextReturns

The string to display.

Nothing.

Example

writeln(\writeln(\

16

After Effects scripting referenceApplication object

17

Application object

appDescription

Provides access to objects and application settings within the After Effects application. The single global object is always available by its name, app.

Attributes of the Application object provide access to specific objects within After Effects. Methods of the Application object can create a project, open an existing project, control Watch Folder mode, purge memory, and quit the After Effects application. When the After Effects application quits, it closes the open project, prompting the user to save or discard changes as necessary, and creates a project file as necessary.

AttributesAttribute

Reference

“Application project attribute” on page26 and “Project object” on page114

Description

The current After Effects project.

project

isoLanguageversionbuildNamebuildNumberisWatchFolderisRenderEnginesettings

“Application isoLanguage attribute” on The locale (language and region) in which the applica-page22tion is running.“Application version attribute” on page29

“Application buildName attribute” on page19

The version number of the After Effects application.The name of this build of the application.

“Application buildNumber attribute” on The number of this build of the application.page20

“Application isWatchFolder attribute” on When true, the local application is running in Watch page23Folder mode.“Application isRenderEngine attribute” on page23

When true, the local After Effects application is running as a render engine.

“Application settings attribute” on Application settings that can be set via scripting.page28 and “RQItemCollection object” on page169

“Application onError attribute” on page24

“Application exitCode attribute” on page22

A callback function that is called when an error occurs in the application.

A numeric status code used when executing a script externally (that is, from a command line or AppleScript). 0 if no error occurred. A positive number indicates an error that occurred while running the script.

When true, the application remains open after running a script from the command line on Windows.

When true, the project is saved if the application closes unexpectedly.

onErrorexitCode

exitAfterLaunchAndEval“Application exitAfterLaunchAndEval

attribute” on page22

saveProjectOnCrashmemoryInUseeffectsactiveViewer

“Application saveProjectOnCrash attri-bute” on page27

“Application memoryInUse attribute” on Memory in use by this application.page23

“Application effects attribute” on page20

“Application activeViewer attribute” on page19

The effects available in the application.

The currently focused or last-focused viewer panel.

17

After Effects scripting referenceApplication object

18

MethodsMethod

Reference

“Application newProject() method” on page24

“Application open() method” on page24“Application quit() method” on page27“Application watchFolder() method” on page29

“Application pauseWatchFolder() method” on page26

Description

Creates a new project in After Effects.Opens a project or an Open Project dialog box.Quits the application.

Starts Watch Folder mode; does not return until Watch Folder mode is turned off.Pauses a current watch-folder process.

newProject()open()quit()

watchFolder()pauseWatchFolder()endWatchFolder()purge()

beginUndoGroup()endUndoGroup()beginSuppressDialogs()endSuppressDialogs()setMemoryUsageLimits()setSavePreferencesOnQuit()activate()scheduleTask()cancelTask()parseSwatchFile()

“Application endWatchFolder() method” on Ends a current watch-folder process.page21

“Application purge() method” on page26“Application beginUndoGroup() method” on page19

Purges a targeted type of cached information (replicates Purge options in the Edit menu).Groups the actions that follow it into a single undoable step.

“Application endUndoGroup() method” on Ends an undo group; needed only when a page21script contains more than one undo group.“Application beginSuppressDialogs() method” on page19

“Application endSuppressDialogs() method” on page21

“Application setMemoryUsageLimits() method” on page28

“Application setSavePreferencesOnQuit() method” on page28

Begins suppression of dialogs in the user inter-face.

Ends suppression of dialogs in the user inter-face.

Sets memory usage limits as in the Memory & Cache preferences area.

Sets whether preferences are saved when the application is quit.

“Application activate() method” on page18Brings the After Effects main window to the

front of the screen.“Application scheduleTask() method” on page27

“Application cancelTask() method” on page20

Schedules a JavaScript script for delayed exe-cution.

Cancels a scheduled task.

“Application parseSwatchFile() method” on Loads a color swatch from an Adobe Swatch page25Exchange (ASE) file.

Application activate() method

app.activate()Description

Opens the application main window if it is minimized or iconified, and brings it to the front of the desktop.

Parameters

None.

18

After Effects scripting referenceApplication object

19

Returns

Nothing.

Application activeViewer attribute

app.activeViewerDescription

The Viewer object for the currently focused or active-focused viewer (Composition, Layer, or Footage) panel. Returns null if no viewers are open.

Type

Viewer object; read-only.

Application beginSuppressDialogs() method

app.beginSuppressDialogs()Description

Begins suppression of script error dialog boxes in the user interface. Use endSuppressDialogs() to resume the display of error dialogs. See “Application endSuppressDialogs() method” on page21.

Parameters

None.

Returns

Nothing.

Application beginUndoGroup() method

app.beginUndoGroup(undoString)Description

Marks the beginning of an undo group, which allows a script to logically group all of its actions as a single undoable action (for use with the Edit > Undo/Redo menu items). Use the endUndoGroup() method to mark the end of the group. (See “Application endUndoGroup() method” on page21.)

beginUndoGroup() and endUndoGroup() pairs can be nested. Groups within groups become part of the

larger group, and will undo correctly. In this case, the names of inner groups are ignored.

ParametersundoStringReturns

The text that will appear for the Undo command in the Edit menu (that is, “Undo ”)

Nothing.

Application buildName attribute

app.buildName

19

After Effects scripting referenceApplication object

20

Description

The name of the build of After Effects being run, used internally by Adobe for testing and troubleshooting.

Type

String; read-only.

Application buildNumber attribute

app.buildNumberDescription

The number of the build of After Effects being run, used internally by Adobe for testing and troubleshooting.

Type

Integer; read-only.

Application cancelTask() method

app.cancelTask(taskID)Description

Removes the specified task from the queue of tasks scheduled for delayed execution.

ParameterstaskIDReturns

An integer that identifies the task, as returned by app.scheduleTask().

Nothing.

Application effects attribute

app.effectsDescription

The effects available in the application.

Type

Array, with each element containing the following properties; read-only:

displayNamecategorymatchName

String representing the localized display name of the effect as seen in the Effect menu.

String representing the localized category label as seen in the Effect menu. This can be \effects that aren’t normally shown to the user.

String representing the internal unique name for the effect. This name does not change between ver-sions of After Effects. Use this value to apply the effect.

Example

var effectName = app.effects[12].displayName;

20

百度搜索“77cn”或“免费范文网”即可找到本站免费阅读全部范文。收藏本站方便下次阅读,免费范文网,提供经典小说综合文库After_Effects_CS6_Scripting_Guide(AE脚本参考书)(4)在线全文阅读。

After_Effects_CS6_Scripting_Guide(AE脚本参考书)(4).doc 将本文的Word文档下载到电脑,方便复制、编辑、收藏和打印 下载失败或者文档不完整,请联系客服人员解决!
本文链接:https://www.77cn.com.cn/wenku/zonghe/589605.html(转载请注明文章来源)
Copyright © 2008-2022 免费范文网 版权所有
声明 :本网站尊重并保护知识产权,根据《信息网络传播权保护条例》,如果我们转载的作品侵犯了您的权利,请在一个月内通知我们,我们会及时删除。
客服QQ: 邮箱:tiandhx2@hotmail.com
苏ICP备16052595号-18
× 注册会员免费下载(下载后可以自由复制和排版)
注册会员下载
全站内容免费自由复制
注册会员下载
全站内容免费自由复制
注:下载文档有可能“只有目录或者内容不全”等情况,请下载之前注意辨别,如果您已付费且无法下载或内容有问题,请联系我们协助你处理。
微信: QQ: