User Tools

Site Tools


DzBackdrop

Backdrop that gets drawn behind viewport scenes.

More...

Inherits :

Enumerations

Properties

Constructors

DAZ Script
DzBackdrop ()

Methods

Signals

Detailed Description

This class encapsulates a 2D image and the parameters for drawing the image as a backdrop for the scene. An instance of this class only contributes to the scene if it is set as the current backdrop for the scene.

See Also:

Enumerations


: Rotation

Enumerated image rotation types

  • NO_ROTATION - No rotation
  • ROTATE_LEFT_90 - 90 degree rotation Counter-Clockwise
  • ROTATE_RIGHT_90 - 90 degree rotation Clockwise
  • ROTATE_180 - 180 degree rotation

Properties


Color : backgroundColor

This property holds the background color of the backdrop

Since:

  • 4.6.4.30

Boolean : flipHorizontal

This property holds whether or not the backdrop is flipped horizontally


Boolean : flipVertical

This property holds whether or not the backdrop is flipped vertically


Rotation : rotation

This property holds the rotation applied to the backdrop


Boolean : visible

This property holds whether or not the backdrop is visible in the viewport

Since:

  • 4.6.4.30

Boolean : visibleInRender

This property holds whether or not the backdrop is visible in a render

Since:

  • 4.6.4.32

Constructors


DzBackdrop()

Default Constructor.

Methods


void : adjustRenderAspectRatioToMatchTexture()

Changes the render aspect ratio to match the backdrop image, and the image dimensions

Since:

  • 4.6.4.33

void : adjustRenderDimensionsToMatchTexture()

Changes the render image dimensions and aspect ratio to match the backdrop image

Since:

  • 4.6.4.33

void : clear()

Clears the current back drop image, and resets all parameters.

Example:

// Get the backdrop for the scene
var oBackdrop = Scene.getBackdrop();
 
// Clear the backdrop
oBackdrop.clear();

DzColorProperty : getBackgroundColorControl()

Return Value:

  • The property that controls the backdrop color or tinting

Since:

  • 4.6.4.35

DzBoolProperty : getHorizontalFlipControl()

Return Value:

  • The property that controls whether the backdrop is flipped horizontally

DzMaterial : getMaterial()

Return Value:

  • An editable instance of the material used to shade the backdrop.

Example:

// Get the backdrop for the scene
var oBackdrop = Scene.getBackdrop();
// Get the material for the backdrop
var oMaterial = oBackdrop.getMaterial();
 
// Set the color of the backdrop to red
oMaterial.setDiffuseColor( new Color( 255, 0, 0 ) );

DzEnumProperty : getRotationControl()

Return Value:

  • The property that controls rotation of the backdrop

DzTexture : getTexture()

Return Value:

  • The current backdrop image.

Example:

// Get the backdrop for the scene
var oBackdrop = Scene.getBackdrop();
// Get the texture for the backdrop
var oTexture = oBackdrop.getTexture();
 
// Log the file name of the current backdrop image
if( oTexture ){
	print( String("Current Backdrop: %1").arg( oTexture.getFilename() ) );
} else {
	print( "No Current Backdrop Image" );
}

See Also:


DzBoolProperty : getVerticalFlipControl()

Return Value:

  • The property that controls whether the backdrop is flipped vertically

DzBoolProperty : getVisibleControl()

Return Value:

  • The property that controls whether the backdrop is visible

Since:

  • 4.6.4.32

DzBoolProperty : getVisibleInRenderControl()

Return Value:

  • The property that controls whether the backdrop is visible in a render

Since:

  • 4.6.4.32

void : setTexture( DzTexture img )

Sets the backdrop image.

Parameter(s):

  • img - The backdrop image.

Example:

// Get the backdrop for the scene
var oBackdrop = Scene.getBackdrop();
// Get the image manager
var oImageMgr = App.getImageMgr();
 
// Get an image
var sImage = String("%1/../Pictures/Sample Pictures/Desert.jpg").arg( App.getCommonUserDocumentPath() );
var oImage = oImageMgr.getImage( sImage );
 
// Set the backdrop image
oBackdrop.setTexture( oImage );
// Make the backdrop visible
oBackdrop.visible = true;

See Also:


void : showOptions( QWidget parent=undefined )

Deprecated

Shows the options dialog for this backdrop.

Example:

// Get the backdrop for the scene
var oBackdrop = Scene.getBackdrop();
 
// Display options for the backdrop to the user
oBackdrop.showOptions( MainWindow );

Signals


void : backgroundColorChanged()

Signature:“backgroundColorChanged()”

Emitted when the background color of this backdrop changes.

Since:

  • 4.6.4.30

void : drawnDataChanged()

Signature:“drawnDataChanged()”

Emitted when the information in this backdrop changes.


void : visiblityChanged()

Signature:“visiblityChanged()”

Emitted when the visibility of this backdrop changes.

Since:

  • 4.6.4.32