跳转到内容

渲染队列

app.project.renderQueue

RenderQueue 对象表示渲染自动化过程,即通过特定 After Effects 项目的渲染队列面板可用的数据和功能。属性提供了对渲染队列中项目及其渲染状态的访问。方法可以启动、暂停和停止渲染过程。RenderQueueItem 对象 提供了对要渲染项目的特定设置的访问。


app.project.renderQueue.canQueueInAME

指示 After Effects 渲染队列中是否有排队的渲染项目。只有排队的项目才能添加到 AME 队列中。

RenderQueue.queueInAME()

Boolean; 只读.


app.project.renderQueue.queueNotify

读取或写入整个渲染队列的 Notify 属性。 这在用户界面中表现为渲染队列面板右下角的复选框。

Boolean; 可读写.


app.project.renderQueue.items

渲染队列中所有项目的集合。请参阅 RenderQueueItem 对象

RQItemCollection 对象; 只读.


app.project.renderQueue.numItems

渲染队列中的项目总数。

Integer; 只读.


app.project.renderQueue.rendering

当为 true 时,渲染过程正在进行或暂停。当为 false 时,渲染过程已停止。

Boolean; 只读.


app.project.renderQueue.item(index)

从项目集合中获取指定的项目。

参数类型描述
indexInteger, 范围为 [0..numItems]项目的位置索引。

RenderQueueItem 对象


app.project.renderQueue.pauseRendering(pause)

暂停当前的渲染过程,或继续已暂停的渲染过程。这与在渲染过程中点击渲染队列面板中的“暂停”按钮相同。你可以从 RenderQueueItem.onstatusapp.onError 回调中调用此方法。

参数类型描述
pauseBooleantrue 暂停当前的渲染过程,false 继续已暂停的渲染。

无。


app.project.renderQueue.render()

启动渲染过程。这与点击渲染队列面板中的“渲染”按钮相同。该方法在渲染过程完成之前不会返回。要暂停或停止渲染过程,请从 onErroronstatus 回调中调用 RenderQueue.pauseRendering()RenderQueue.stopRendering()

  • 要在渲染过程中响应错误,请在 app.onError 中定义一个回调函数。
  • 要在渲染过程中响应特定项目状态的变化,请在关联的 RenderQueueItem 对象中的 RenderQueueItem.onstatus 中定义一个回调函数。

无。

无。


app.project.renderQueue.showWindow(doShow)

显示或隐藏渲染队列面板。

参数类型描述
doShowBoolean当为 true 时,显示渲染队列面板。当为 false 时,隐藏它。

无。


app.project.renderQueue.stopRendering()

停止渲染过程。这与在渲染过程中点击渲染队列面板中的“停止”按钮相同。你可以从 RenderQueueItem.onstatusapp.onError 回调中调用此方法。

无。

无。


app.project.renderQueue.queueInAME(render_immediately_in_AME)

调用“在 AME 中排队”命令。此方法需要传递一个布尔值,告诉 AME 是仅将渲染项目排队 (false) 还是 AME 也应该开始处理其队列 (true)。

参数类型描述
render_immediately_in_AMEBoolean告诉 AME 是仅将渲染项目排队 (false) 还是 AME 也应该开始处理其队列 (true)。

无。

以下示例代码检查渲染队列中是否有排队的项目,如果有,则将它们排队到 AME 中,但不会立即开始渲染:

// 支持在 AME 中排队的脚本。
// 需要 Adobe Media Encoder 11.0。
if (app.project.renderQueue.canQueueInAME === true) {
// 将排队的项目发送到 AME,但不立即开始渲染。
app.project.renderQueue.queueInAME(false);
} else {
alert("渲染队列中没有排队的项目。");
}