3ds Max C++ API Reference
ImageFilter Class Referenceabstract

#include <filters.h>

+ Inheritance diagram for ImageFilter:

Public Member Functions

FLTExport ImageFilter ()
 
virtual FLTExport ~ImageFilter ()
 
virtual FLTExport void SetSource (Bitmap *map)
 
virtual FLTExport void SetForeground (Bitmap *map)
 
virtual FLTExport void SetMask (Bitmap *map)
 
virtual FLTExport void SetFilterInfo (ImageFilterInfo *i)
 
virtual FLTExport BOOL ValidatePiData (ImageFilterInfo *fi, ILoad *iload=NULL)
 This is called on file load to allow the plugin to version the plugin data. More...
 
virtual FLTExport HWND DlgHandle (void)
 
Description/Copyright/Author/Version


virtual FLTExport const MCHARDescription ()=0
 
virtual FLTExport const MCHARAuthorName ()=0
 
virtual FLTExport const MCHARCopyrightMessage ()=0
 
virtual FLTExport UINT Version ()=0
 
Capabilities
virtual FLTExport DWORD Capability ()=0
 
Dialogs
virtual FLTExport void ShowAbout (HWND hWnd)=0
 
virtual FLTExport BOOL ShowControl (HWND hWnd)
 
Rendering
virtual FLTExport BOOL Render (HWND hWnd)=0
 
Max Interface Pointer
virtual FLTExport InterfaceMax ()
 
Linear Interpolation
virtual FLTExport int Lerp (int a, int b, int l)
 
virtual FLTExport int Lerp (int a, int b, float f)
 
Parameter Block Configuration Data

A 'parameter block' is just like the data that a developer wants to load and save.

See the sample code below that shows how these methods are used to save the data in the UserSettable structure.

typedef struct userSettable {
int data1
float data2
} UserSettable
DWORD MyFilter::EvaluateConfigure () {
return sizeof (UserSettable)
}
BOOL MyFilter::LoadConfigure (void *ptr) {
UserSettable *buf = (UserSettable *) ptr
memcpy (&userSettings, ptr, sizeof(UserSettable))
return TRUE
}
BOOL MyFilter::SaveConfigure (void *ptr) {
if (ptr) {
memcpy (ptr, &userSettings, sizeof(UserSettable))
return TRUE
} else
return FALSE
}
virtual FLTExport DWORD EvaluateConfigure ()
 
virtual FLTExport BOOL LoadConfigure (void *ptr, DWORD piDataSize)
 
virtual FLTExport BOOL SaveConfigure (void *ptr)
 
Preview Creation
virtual FLTExport BOOL CreatePreview (HWND hWnd, Bitmap **back, int frame, int width, int height, float aspect, Bitmap **fore=NULL, DWORD flag=PREVIEW_UP)
 
Channels
virtual FLTExport DWORD ChannelsRequired ()
 
Filter Control Dialog Interactivity
virtual FLTExport void MakeDlgInteractive (HWND hWnd)
 
virtual FLTExport BOOL IsInteractive (void)
 
virtual FLTExport void FilterUpdate ()
 
Track View Node Methods
virtual FLTExport ITrackViewNodeCreateNode ()
 
virtual FLTExport ITrackViewNodeNode ()
 

Public Attributes

TimeChange timeChange
 
UndoNotifyundonotify
 

Protected Attributes

BOOL interactive
 
HWND vpSetuphWnd
 
HWND vphWnd
 
HWND dlghWnd
 
Bitmapsrcmap
 
Bitmapmskmap
 
Bitmapfrgmap
 
ImageFilterInfoifi
 

Additional Inherited Members

- Static Public Member Functions inherited from MaxHeapOperators
static UtilExport voidoperator new (size_t size)
 Standard new operator used to allocate objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e)
 Standard new operator used to allocate objects if there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate objects that takes the type of memory, filename and line number where the new was called If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate objects that takes the filename and line number where the new was called If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new (size_t size, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate objects that takes extra flags to specify special operations If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, int block_type, const char *filename, int line)
 New operator used to allocate arrays of objects. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, const char *filename, int line)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport voidoperator new[] (size_t size, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, an exception will be thrown. More...
 
static UtilExport voidoperator new[] (size_t size, const std::nothrow_t &e, unsigned long flags)
 New operator used to allocate arrays of objects If there is insufficient memory, NULL will be returned. More...
 
static UtilExport void operator delete (void *ptr)
 Standard delete operator used to deallocate an object If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an object If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an object that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an object that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete (void *ptr, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an object that takes extra flags to specify special operations If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e)
 Standard delete operator used to deallocate an array of objects If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, int block_type, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the type of memory, filename and line number where the delete was called If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, const char *filename, int line)
 Delete operator used to deallocate an array of objects that takes the filename and line number where the delete was called If the pointer is invalid, nothing will happen. More...
 
static UtilExport void operator delete[] (void *ptr, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport void operator delete[] (void *ptr, const std::nothrow_t &e, unsigned long flags)
 Delete operator used to deallocate an array of objects that takes extra flags to specify special operations If the pointer is invalid, an exception will be thrown. More...
 
static UtilExport voidoperator new (size_t size, void *placement_ptr)
 Placement new operator. More...
 
static UtilExport void operator delete (void *ptr, void *placement_ptr)
 Placement delete operator. More...
 
static UtilExport voidaligned_malloc (size_t size, size_t alignment)
 Allocates memory on a specified alignment boundary. More...
 
static UtilExport voidaligned_realloc (void *ptr, size_t size, size_t alignment)
 Reallocates memory on a specified alignment boundary. More...
 
static UtilExport void aligned_free (void *ptr)
 Frees a block of memory that was allocated with aligned_malloc/aligned_realloc. More...
 

Detailed Description

See also
Class ImageFilterInfo, Class Bitmap, Class ITrackViewNode, Class TimeChange, Class UndoNotify, Working with Bitmaps.

Description:
Image processing filter plug-ins are derived from ImageFilter. This class has virtual methods the developer implements to provide information about the plug-in version, and description. The developer also implements the Capability() method to indicate the properties of the plug-in such as if it is a one pass filter or compositor, and whether it has a control dialog to be displayed.

The Render() method is the one that actually alters the source image to perform the work of the application.

Filter plug-ins have access to several bitmaps associated with the video post data stream. All filter plug-ins will have at least a pointer to data member srcmap. This is Video Post's main image pipeline. Composition and transition (layer) filters will also receive a second bitmap (frgmap) which should be composited above the main bitmap (srcmap). If mskmap is not NULL, it will contain a pointer to a grayscale image to be used as a mask for the process. Note that developers should not delete these bitmaps as they are maintained by 3ds Max.

If a plug-in is both a filter and a compositor, the plug-in can tell if it is running as a filter when the frgmap pointer is NULL.

Note: If changes are made to an ImageFilter plug-in, the system will not automatically put up the 'The scene has been modified. Do you want to save your changes?' dialog if the user attempts to exit without saving. So that your plug-in does not go unsaved, you should call the following global function if you make changes. This will indicate to the system that the save requester needs to be brought up:

void SetSaveRequired(int b=TRUE);

Sets the 'save dirty bit'. This will indicate to the system that the save requester needs to be presented to the user.
Data Members:
protected:

BOOL interactive;

This data member is available in release 2.0 and later only.

TRUE if the setup dialog is interactive; otherwise FALSE.

HWND vpSetuphWnd;

The window handle of the video post setup dialog.

HWND vphWnd;

The window handle of the Video Post dialog.

HWND dlghWnd;

The window handle of the filter's setup dialogue when in "Interactive" mode.

Bitmap *srcmap

The Source Bitmap (background). Note: The Video Post output resolution may be retrieved using this pointer. The width is srcmap->Width() and the height is srcmap->Height().

Bitmap *mskmap

The Image Mask Bitmap (for grayscale masking). This bitmap is at the Video Post output resolution size when the developer needs to access it in the Render() method.

Bitmap *frgmap

The Foreground Bitmap (for layering/transitions). This bitmap is at the Video Post output resolution size when the developer needs to access it in the Render() method.

ImageFilterInfo *ifi

A pointer to an instance of the class that provides information about this filter and the video post queue.

TimeChange timeChange;

This data member is available in release 2.0 and later only.

This class maintains this time change object so it may send FLT_TIMECHANGED messages.

UndoNotify* undonotify;

This data member is available in release 2.0 and later only.

Points to an instance of the class that can be used so an ImageFilter plug-in can get notified on a change to its Track View Node.

Constructor & Destructor Documentation

◆ ImageFilter()

Remarks
Constructor. The srcmap, mskmap and frgmap are set to NULL. The undo notify pointer is set to NULL and the interactive flag is set to FALSE.

◆ ~ImageFilter()

virtual FLTExport ~ImageFilter ( )
virtual
Remarks
Destructor.

Member Function Documentation

◆ Description()

virtual FLTExport const MCHAR* Description ( )
pure virtual
Remarks
Returns an ASCII description of the filter plug-in (i.e. "Convolution Filter").

◆ AuthorName()

virtual FLTExport const MCHAR* AuthorName ( )
pure virtual
Remarks
Returns the name of the plug-in's author.

◆ CopyrightMessage()

virtual FLTExport const MCHAR* CopyrightMessage ( )
pure virtual
Remarks
Implemented by the Plug-In

Returns the plug-in ASCII Copyright message.

◆ Version()

virtual FLTExport UINT Version ( )
pure virtual
Remarks
Returns the plug-in version number * 100 (i.e. v3.01 = 301).

◆ Capability()

virtual FLTExport DWORD Capability ( )
pure virtual
Remarks
This method returns a set of flags that describe the capabilities of this filter plug-in. These capabilities indicate if the plug-in is a filter, compositor, or has a control panel. To create a flag, "OR" the capabilities together, ie. (IMGFLT_CONTROL | IMGFLT_COMPOSITOR). Note: It is valid for a plug-in to both a Filter and a Compositor. If both flags are set, the user will be able to select it from both the Filter list and from the Compositor list. The plug-in will know it is running as a filter when the foreground map pointer, frgmap, is NULL.
Returns
See ImageFilter Capability Flags.

◆ ShowAbout()

virtual FLTExport void ShowAbout ( HWND  hWnd)
pure virtual
Remarks
This method is called by the system to display the About Box of the plug-in. This dialog is mandatory so the developer must implement this method.
Parameters:
HWND hWnd

The parent window handle of the dialog.

◆ ShowControl()

virtual FLTExport BOOL ShowControl ( HWND  hWnd)
inlinevirtual
Remarks
This method is called by the system to display the control panel for the plug-in. This control panel is optional and its existence should be flagged by the capability flag returned from Capability() (IMGFLT_CONTROL). If a plug-in does not have a control panel, don't implement this method and let it default to FALSE.
Parameters:
HWND hWnd

The parent window handle of the dialog.
Returns
TRUE if the user selects OK to exit the dialog, and FALSE if the user selects Cancel.
Default Implementation:
{ return FALSE; }
787 { return FALSE; }

◆ SetSource()

virtual FLTExport void SetSource ( Bitmap map)
inlinevirtual
792 {srcmap = map;}
Bitmap * srcmap
Definition: filters.h:712

◆ SetForeground()

virtual FLTExport void SetForeground ( Bitmap map)
inlinevirtual
793 {frgmap = map;}
Bitmap * frgmap
Definition: filters.h:714

◆ SetMask()

virtual FLTExport void SetMask ( Bitmap map)
inlinevirtual
794 {mskmap = map;}
Bitmap * mskmap
Definition: filters.h:713

◆ SetFilterInfo()

virtual FLTExport void SetFilterInfo ( ImageFilterInfo i)
inlinevirtual
795 {ifi = i;}
ImageFilterInfo * ifi
Definition: filters.h:718

◆ Render()

virtual FLTExport BOOL Render ( HWND  hWnd)
pure virtual
Remarks
This is the method the plug-in implements to alter the image. This method performs the work of the filter or compositor.
Parameters:
HWND hWnd

The window handle to which the plug-in will be sending progress and abort check messages.
Returns
TRUE if the render was completed; otherwise FALSE (error or canceled by user).
Sample Code:
Below is an example of a render loop through each horizontal band of the image demonstrating the posting of messages. At the start of the loop the progress and check abort messages are sent. The progress message updates the Execute Video Post dialog with how much of the image has been processed. The check abort message allows the plug-in to detect if the user has canceled the operation.

BOOL result = TRUE;
BOOL abort = FALSE;
for (int iy = 0; iy Height(); iy++)
{
// Progress Report
SendMessage(hWnd,FLT_PROGRESS,iy,srcmap->Height()-1);
// Check for Abort
SendMessage(hWnd,FLT_CHECKABORT,0,(LPARAM)(BOOL )&abort);
if (abort) {
result = FALSE;
break;
}
}
return(result);
int Height()
Definition: bitmap.h:3903
Messages are sent via the Window API SendMessage() function. See ImageFilter-Related Messages.

◆ Max()

virtual FLTExport Interface* Max ( )
virtual
Remarks
Implemented by the System.

This method returns an interface pointer for calling methods implemented in 3ds Max. See Class Interface.

◆ Lerp() [1/2]

virtual FLTExport int Lerp ( int  a,
int  b,
int  l 
)
virtual
Remarks
This method is used internally.

◆ Lerp() [2/2]

virtual FLTExport int Lerp ( int  a,
int  b,
float  f 
)
virtual
Remarks
This method is used internally.

◆ EvaluateConfigure()

virtual FLTExport DWORD EvaluateConfigure ( )
inlinevirtual
Remarks
The system will call this method to determine the buffer size required by the plug-in. The plug-in can save its parameter block in this buffer by implementing the SaveConfigure() method.
Returns
The number of bytes required by the plug-in's parameter block.
Default Implementation:
{ return 0; }
914 { return 0; }

◆ LoadConfigure()

virtual FLTExport BOOL LoadConfigure ( void ptr,
DWORD  piDataSize 
)
inlinevirtual
Remarks
This method will be called so the plug-in can load its parameter block. Memory management is performed by 3ds Max using standard LocalAlloc() and LocalFree().
Parameters:
void *ptr

A pre-allocated buffer.
Returns
TRUE if the data was loaded OK; otherwise FALSE.
Default Implementation:
{ return (FALSE) };
924 { return (FALSE); }

◆ SaveConfigure()

virtual FLTExport BOOL SaveConfigure ( void ptr)
inlinevirtual
Remarks
This method will be called so the plug-in can transfer its parameter block to the host.
Parameters:
void *ptr

A pre-allocated buffer the plug-in may write to.
Returns
TRUE if the data was saved OK; otherwise FALSE.
Default Implementation:
{ return (FALSE); }
933 { return (FALSE); }

◆ ValidatePiData()

virtual FLTExport BOOL ValidatePiData ( ImageFilterInfo fi,
ILoad iload = NULL 
)
inlinevirtual

This is called on file load to allow the plugin to version the plugin data.

BOOL ImageFilter_Stars::ValidatePiData( ImageFilterInfo *fi, ILoad *pILoad )
{
if (fi == NULL)
return FALSE;
void* ptr = fi->GetPiData();
DWORD piDataSize = fi->GetPiDataSize();
if ((piDataSize == sizeof(AVIDATA_old_x32) + ((AVIDATA_old_x32*)ptr)->codec_data_size) ||
(piDataSize == sizeof(AVIDATA_old_x64) + ((AVIDATA_old_x64*)ptr)->codec_data_size))
{
// old data format - update to new format
iload = pILoad; // iload is ILoad* member variable that can be used by LoadConfigure
if (LoadConfigure(ptr, piDataSize))
{
DWORD newSize = EvaluateConfigure();
if (fi->AllocPiData(newSize))
}
iload = NULL;
}
return TRUE;
}
#define NULL
Definition: autoptr.h:18
Definition: ioapi.h:414
virtual FLTExport BOOL SaveConfigure(void *ptr)
Definition: filters.h:933
virtual FLTExport BOOL LoadConfigure(void *ptr, DWORD piDataSize)
Definition: filters.h:924
virtual FLTExport DWORD EvaluateConfigure()
Definition: filters.h:914
Definition: filters.h:164
FLTExport BOOL AllocPiData(DWORD size)
FLTExport DWORD GetPiDataSize()
Definition: filters.h:249
FLTExport void * GetPiData()
Definition: filters.h:247
Parameters
[in]fiThe ImageFilterInfo holding the plugin data
[in]iloadThe ILoad* if called when loading the ImageFilterInfo from a scene file, NULL otherwise.
966 { return TRUE; }

◆ CreatePreview()

virtual FLTExport BOOL CreatePreview ( HWND  hWnd,
Bitmap **  back,
int  frame,
int  width,
int  height,
float  aspect,
Bitmap **  fore = NULL,
DWORD  flag = PREVIEW_UP 
)
virtual
Remarks
Implemented by the System.

This method provides a preview facility for use by plug-ins. This can be used by plug-ins that want to have a preview bitmap while displaying a control dialog.

Note: When you add a new Video Post event, an event object is created and it is added to the event queue when you hit the OK button. However, because the event is added to the queue only when you exit the dialogue, you cannot create a preview at that stage. Later, when you "Edit" the event, it is part of the queue and you can create a preview. Internally, there is no way for 3ds Max to tell if the "Setup" button was called from an "Add" event or from an "Edit" event. Plug-In developers can tell if they are in the "Add" event mode by looking at the return value from this method. It will be FALSE if in "Add" mode since the call will fail.
Parameters:
HWND hWnd

This window handle will receive progress notification messages. The messages are defined in both BITMAP.H and FILTERS.H:

FLT_PROGRESS

wParam: Current

lParam: Total

FLT_CHECKABORT

wParam: 0

lParam: BOOL*

FLT_TEXTMSG

wParam: 0

lParam: LPCMSTR

BMM_PROGRESS

wParam: Current

lParam: Total

BMM_CHECKABORT

wParam: 0

lParam: *BOOL

BMM_TEXTMSG

wParam: 0

lParam: LPCMSTR

Bitmap **back

A pointer to the Bitmap Pointer (the Background). If the Bitmap pointer is NULL, a new bitmap is created using the given dimensions. This pointer must be NULL the first time this function is called as the bitmap must be created by Video Post. Once this function is called and a bitmap is returned, it is OK to call it again using this map. In this case, Video Post will simply use it instead of creating a new one. Note: You must NOT delete the bitmap when done – Video Post will take care of it.

int frame

The desired frame in TICKS. Note that this is the position of the Video Post frame slider (in TICKS) and not the main 3ds Max frame slider. See the Advanced Topics section on Time Functions for details on ticks.

int width

The desired width of the preview.

int height

The desired height of the preview.

Float aspect

The desired aspect ratio of the preview.

Bitmap **fore = NULL

A pointer to the Bitmap Pointer (the Foreground). For layer plug-ins, this points to the foreground image. This is only valid if flag is set to PREVIEW_BEFORE. In this case back will hold Video Post main queue and fore will have the foreground image to be composited. This is useful if you, a layer plug-in, want to collect the images and run a realtime preview. If flag is not PREVIEW_BEFORE, fore will be a NULL pointer indicating there is no bitmap.

DWORD flag = PREVIEW_UP

The flag controls how much of the queue to run. The options are:

PREVIEW_BEFORE

The queue is run up to the event before the filter calling it.

PREVIEW_UP

The queue is run up to the event (filter) calling this function.

PREVIEW_WHOLE

The whole queue is run including events after this filter.
Returns
TRUE if the creation was successful; otherwise FALSE.

◆ ChannelsRequired()

virtual FLTExport DWORD ChannelsRequired ( )
inlinevirtual
Remarks
If a filter wants to work with the G-buffer (geometry/graphics buffer) it implements this method. It is used to indicate what image channels this plug-in requires. Prior to rendering 3ds Max will scan the plug-ins in the chain of events and find out all the channels being requested. At the time the plug-in's Render() method is called, it will have access to these channels. The methods of class Bitmap may be used to access the channels.

Note: The generation of these channels should not normally be a default setting for the plug-in. These channels are memory intensive and if the plug-in won't use the channel it should not ask for it. Normally the plug-in would ask the user which channels to use and only then set the proper flags.
Returns
See Image (G-Buffer) Channels.
Default Implementation:
{ return BMM_CHAN_NONE; }
1142 { return BMM_CHAN_NONE; }
#define BMM_CHAN_NONE
Definition: gbuf.h:85

◆ DlgHandle()

virtual FLTExport HWND DlgHandle ( void  )
inlinevirtual
1153 { return dlghWnd; }
HWND dlghWnd
Definition: filters.h:690

◆ MakeDlgInteractive()

virtual FLTExport void MakeDlgInteractive ( HWND  hWnd)
virtual
Remarks
Implemented by the System.

This method may be used to allow a filter's dialog to operate interactively. This means that a user can have the filter's control dialog up and still operate 3ds Max and Track View at the same time. This method should be called from the filter's Control() method as part of the WM_INITDIALOG code.

Note that even though this method can be called safely for any reason, developers should only call it when using animated parameters. It doesn't make sense to use it for filters with non-animated or no parameters. For sample code using this method see /MAXSDK/SAMPLES/POSTFILTERS/NEGATIVE/NEGATIVE.CPP.
Parameters:
HWND hWnd

The parent window handle.
Sample Code:
BOOL ImageFilter_Negative::Control(HWND hWnd,UINT message,WPARAM wParam,LPARAM lParam) {
switch (message) {
case WM_INITDIALOG: {
//-- Make Dialogue Interactive
...
virtual FLTExport void MakeDlgInteractive(HWND hWnd)

◆ IsInteractive()

virtual FLTExport BOOL IsInteractive ( void  )
inlinevirtual
Remarks
Implemented by the System.

Returns TRUE if the control dialog is interactive; otherwise FALSE. This means a user can have the filter's control dialog up and still operate 3ds Max and Track View at the same time.
1189 { return interactive; }
BOOL interactive
Definition: filters.h:689

◆ FilterUpdate()

virtual FLTExport void FilterUpdate ( )
inlinevirtual
Remarks
Whenever a filter instance is created or updated (i.e. the user went through the Filter Edit Control dialog) this method is called. The filter may use it to create or update its node controls. For an example see /MAXSDK/SAMPLES/POSTFILTERS/NEGATIVE/NEGATIVE.CPP.
Default Implementation:
{}
1205 { }

◆ CreateNode()

virtual FLTExport ITrackViewNode* CreateNode ( )
virtual
Remarks
Implemented by the System.

This method may be called to create a new Track View Node.

◆ Node()

virtual FLTExport ITrackViewNode* Node ( )
inlinevirtual
Remarks
Implemented by the System.

This method is used to return the Track View node for this filter.
1217 { return ifi->Node(); }
FLTExport ITrackViewNode * Node()
Definition: filters.h:306

Member Data Documentation

◆ interactive

BOOL interactive
protected

◆ vpSetuphWnd

HWND vpSetuphWnd
protected

◆ vphWnd

HWND vphWnd
protected

◆ dlghWnd

HWND dlghWnd
protected

◆ srcmap

Bitmap* srcmap
protected

◆ mskmap

Bitmap* mskmap
protected

◆ frgmap

Bitmap* frgmap
protected

◆ ifi

ImageFilterInfo* ifi
protected

◆ timeChange

TimeChange timeChange

◆ undonotify

UndoNotify* undonotify