User Tools

Site Tools


Dz3DViewRenderHandler

A render handler that renders into a viewport.

More...

Inherits :

Constructors

DAZ Script
Dz3DViewRenderHandler ( DzViewport view, DzTime startTime, String filename )

Methods

Detailed Description

This render handler is a DzImageRenderHandler that is the size of the aspect frame for the given viewport, and paints all data passed to it over the current view.

Constructors


Dz3DViewRenderHandler( DzViewport view, DzTime startTime, String filename )

Constructor. Creates a render handler that will render to the given viewport.

Parameter(s):

  • view - The viewport to render in.
  • startTime - The starting scene time for the render.
  • filename - The name of the file to save the render to.

Example:

// Get the active viewport and camera
var oActiveView = MainWindow.getViewportMgr().getActiveViewport();
var oCamera = oActiveView.get3DViewport().getCamera();
 
// Create a handler
var oHandler = new Dz3DViewRenderHandler( oActiveView, 0, App.getTempPath() + "/test.png" );
 
// If we have a valid handler
if( oHandler ){
	// Set the background color
	oHandler.setBackColor( oActiveView.get3DViewport().background );
 
	// Get the render options
	var oRenderOptions = App.getRenderOptions();
 
	// Get the renderer
	var oRenderer = oRenderOptions.getActiveRenderer();
 
	// Render, using our handler and options
	oRenderer.render( oHandler, oCamera, oRenderOptions );
}

Methods


Number : getLeftOffset()

Return Value:

  • The offset for this handler, from the left of the view.

Since:

  • 4.6.4.18

Number : getTopOffset()

Return Value:

  • The offset for this handler, from the top of the view.

Since:

  • 4.6.4.18

renderview_dz : getView()

Return Value:

  • The render view for this handler.

Since:

  • 4.6.4.18

DzViewport : getViewport()

Return Value:

  • The viewport for this handler.

Since:

  • 4.6.4.18