Render

The Render class is used to render the scene, or a part of the scene. The scripting environment can receive notifications when the scene frame is ready.

The following is a list of the Render functions:

frameReady (QT signal)
setCombine
setFieldType
setBgColor
setResolution
setRenderDisplay
setWriteEnabled
renderFinished (QT signal)
renderScene
renderSceneAll
cancelRender

Example

function ExportHandler()

{

this._exportDir = scene.currentProjectPathRemapped() + "/frames/";

}

ExportHandler.prototype.exportFinished = function()

{

MessageBox.information("Render Finished");

}

ExportHandler.prototype.frameReady = function(frame, frameCel)

{

var exportFile = this._exportDir + frame + ".tga";

frameCel.imageFile(exportFile) // save image

}

function Export()

{

var handler = new ExportHandler()

render.renderFinished.connect( handler, handler.exportFinished);

render.frameReady.connect( handler, handler.frameReady);

render.setRenderDisplay("Display");

render.renderSceneAll();

render.renderFinished.disconnect( handler, handler.exportFinished);

render.frameReady.disconnect( handler, handler.frameReady);

}

Related Topics 

Scripting Reference