The following methods provide access to the values in the Viewport Background dialog.
getBkgFrameNum <time>
Returns the viewport background image frame displayed at the specified time. Returns a value of -1 if no frame is to be used for specified time.
getBkgImageAnimate() setBkgImageAnimate <boolean>
Get and set whether Animate Background is on ( true ), or off ( false) .
getBkgImageAspect() setBkgImageAspect <name>
Get and set the background image Aspect Ratio option. Valid <name> values are:
#view -- Match Viewport #bitmap -- Match Bitmap #output -- Match Rendering Output getBkgORType <start_end_integer> setBkgORType <start_end_integer> <name>
Get and set the background image Start Processing and End Procession options.
<start_end_integer> = 0 - Start Processing; 1 - End Processing
Valid <name> values are:
#blank -- Blank Before Start/After End #hold -- Hold Before Start/After End #loop -- Loop After End getBkgRangeVal()
Get the background image Use Frame range as a Point2 value. The first component of the Point2 value is the Start Frame, the second component is the End Frame.
setBkgFrameRange <point3>
Set the background image Use Frame range and step value. First component of <point3> is Start Frame, second component is End Frame, and third component is Step Frame.
getBkgStartTime() setBkgStartTime <time>
Get and set the background image Start At frame.
getBkgSyncFrame() setBkgSyncFrame <integer>
Get and set the background image Synch Start To Frame frame.
backgroundImageFileName
Lets you get and set a String value that defines the viewport background image bitmap file name. It contains the corresponding bitmap file name set in the Viewport Background dialog.
setAsBackground <bitmap>
Sets the specified bitmap as the viewport background image. The <bitmap> must be associated with a bitmap file, which is true if:
1 - the bitmap is read from a file via openBitmap() or selectBitMap();
2 - the bitmap was saved via save <bitmap>;
3 - the MAXBitMap constructor is passed a BitmapInfo whose Name length isn't 0 (for example if you retrieve a bitmap from a BitmapTexture); or
4 - the bitmap is saved in the render() command.
InvalidateAllBackgrounds()
Invalidates the viewport background image for all viewports, causing then to be redrawn