A render handler that renders into an image (or images).
Inherits :
Inherited By : Dz3DViewRenderHandler and DzViewRenderHandler
DAZ Script |
---|
DzImageRenderHandler ( Size size, DzTime renderTime, String filename ) |
DzImageRenderHandler ( Size size, DzTime startingTime, Number numFrames, String filename, Boolean isMovie ) |
DAZ Script | |
---|---|
void | addRenderFiles ( Array files ) |
void | beginFrame ( Number frame ) |
void | beginRender () |
void | finishFrame () |
void | finishRender () |
Boolean | getCreateThumbnail () |
Image | getCurrentFrameImage () |
String | getFilename () |
Number | getNumFrames () |
Size | getSize () |
DzTime | getStartingTime () |
void | setCreateThumbnail ( Boolean createThumb ) |
Has an array of QImage objects for capturing data from a renderer - one image will be created for each frame rendered.
Boolean : postProcessOnRenderFinish
Holds whether or not a post-process operation occurs when the render is finished.
Since:
Holds whether each frame is written to file when finishFrame is called. The internal images is reset on each new frame.
Since:
DzImageRenderHandler( Size size, DzTime renderTime, String filename )
Create a new image render handler for rendering a single frame.
Parameter(s):
Example:
// Get the active viewport and camera var oActiveView = MainWindow.getViewportMgr().getActiveViewport(); var oCamera = oActiveView.get3DViewport().getCamera(); // Get the render options var oRenderOptions = App.getRenderOptions(); // Create a handler var oHandler = new DzImageRenderHandler( oRenderOptions.getImageSize(), 0, App.getTempPath() + "/test.jpg" ); // If we have a valid handler if( oHandler ){ // Set the background color oHandler.setBackColor( oActiveView.get3DViewport().background ); // Get the renderer var oRenderer = oRenderOptions.getActiveRenderer(); // Render, using our handler and options oRenderer.render( oHandler, oCamera, oRenderOptions ); }
DzImageRenderHandler( Size size, DzTime startingTime, Number numFrames, String filename, Boolean isMovie )
Create a new image render handler for rendering a multiple frames.
Parameter(s):
true
, the filename is expected to be a valid filename for saving a movie file, if false
, it is expected to be a valid image name.Example:
// Get the active viewport and camera var oActiveView = MainWindow.getViewportMgr().getActiveViewport(); var oCamera = oActiveView.get3DViewport().getCamera(); // Get the render options var oRenderOptions = App.getRenderOptions(); // Create a handler var oHandler = new DzImageRenderHandler( oRenderOptions.getImageSize(), 0, 1, App.getTempPath() + "/test.jpg", false ); // Render if we have a handler if( oHandler ){ var oRenderer = oRenderOptions.getActiveRenderer(); oRenderer.render( oHandler, oCamera, oRenderOptions ); }
void : addRenderFiles( Array files )
Adds files to this handler's list of rendered files.
Parameter(s):
Since:
void : beginFrame( Number frame )
Begins rendering the given frame.
Parameter(s):
void : beginRender()
Starts a render.
void : finishFrame()
Finishes rendering the current frame
void : finishRender()
Finishes the render and saves it to file.
Boolean : getCreateThumbnail()
Return Value:
true
if a thumbnail is created, otherwise false
.Image : getCurrentFrameImage()
Return Value:
String : getFilename()
Return Value:
Since:
Number : getNumFrames()
Return Value:
Return Value:
Return Value:
void : setCreateThumbnail( Boolean createThumb )
Sets whether a thumbnail is created.
Parameter(s):
true
, a thumbnail is created.