Class IMBOps

3DS Max Plug-In SDK

Class IMBOps

See Also: Class FPStaticInterface, Class Bitmap, Class CheckAbortCallback.

class IMBOps: public FPStaticInterface

Description:

This class is available in release 4.0 and later only.

This classs is an interface for Image Motion Blur. This interface is implemented in the Effect plug-in MotionBlur.dlv, which must be present to use it. This interface is does NOT support scripting, only direct calling. The sample code below shows how this is done:

Sample Code:

ClassDesc2* mbcd = GET_MBLUR_CD;

if (mbcd) {

 IMBOps* imb = GetIMBInterface(mbcd);

 imb->ApplyMotionBlur(bm, &imbcb, 1.2f);

 }

Methods:

public:

Prototype:

virtual ULONG ChannelsRequired(ULONG flags=0)=0;

Remarks:

Sets the channels required for the image motion blur.

Parameters:

ULONG flags=0

The following flag may be set:

IMB_TRANSP

Controls whether motion blur works through transparency. Setting it to 0 saves memory, runs faster.

Prototype:

virtual int ApplyMotionBlur(Bitmap *bm, CheckAbortCallback *progCallback=NULL, float duration=1.0f, ULONG flags=IMB_TRANSP, Bitmap* extraBM=NULL)=0;

Remarks:

Applies the motion blur process to the specified bitmap.

Parameters:

Bitmap *bm

The bitmap to apply the motion blur to.

CheckAbortCallback *progCallback=NULL

A pointer to a callback, allowing an abort check during the progress.

float duration=1.0f

The motion blur duration.

ULONG flags=IMB_TRANSP

The following flag may be set:

IMB_TRANSP

Controls whether motion blur works through transparency. Setting it to 0 saves memory, runs faster.

Bitmap* extraBM=NULL

If the extraBM bitmap is supplied, then that is used as the target color bitmap, but the gbuffer information still comes from the other, main, bitmap. this is used to apply motion blur to render lements.

Return Value:

TRUE if success, otherwise FALSE.