3ds Max C++ API Reference
ImageFilterInfo Class Reference

#include <filters.h>

+ Inheritance diagram for ImageFilterInfo:

Public Member Functions

FLTExport ImageFilterInfo ()
 
FLTExport ~ImageFilterInfo ()
 
FLTExport void SetName (const MCHAR *n)
 
FLTExport void SetResource (const MCHAR *n)
 
FLTExport const MCHARName ()
 
FLTExport const MCHARResource ()
 
FLTExport voidGetPiData ()
 
FLTExport void SetPiData (void *ptr)
 
FLTExport DWORD GetPiDataSize ()
 
FLTExport void SetPiDataSize (DWORD s)
 
FLTExport void ResetPiData ()
 
FLTExport BOOL AllocPiData (DWORD size)
 
FLTExport ImageFilterInfooperator= (ImageFilterInfo &from)
 
FLTExport IOResult Save (ISave *isave)
 
FLTExport IOResult Load (ILoad *iload, Interface *max)
 
FLTExport ITrackViewNodeNode ()
 
FLTExport void SetNode (ITrackViewNode *n)
 
FLTExport Class_ID NodeID ()
 
FLTExport void SetNodeID (Class_ID id)
 
FLTExport const MCHARUserLabel ()
 
FLTExport void SetUserLabel (const MCHAR *l)
 
FLTExport int FilterType ()
 
FLTExport void SetFilterType (int type)
 

Public Attributes

BOOL maskenabled
 
BOOL evCopy
 
BOOL invertedmask
 
BitmapInfo mask
 
WORD maskflag
 
BitmapInfo imgQueue
 
FrameRange QueueRange
 
FrameRange ExecutionRange
 
FrameRange FilterRange
 

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 ImageFilter, Class BitmapInfo, Class FrameRange, Class ITrackViewNode, Class Class_ID.

Description:
This class provides information to an image filter plug-in. This is information such as state of any masks used, and the various frame ranges for the video post queue. It is analogous to the BitmapInfo class in the Bitmap Manager.
Data Members:
BOOL maskenabled;

TRUE if the filter has a mask; otherwise FALSE.

BOOL evCopy;

This is used internally as a flag indicating this object is a temporary copy, and not the real thing. It is only an issue when filters have Track View Nodes. This is only used internally.

BOOL invertedmask;

TRUE if the mask is inverted; otherwise FALSE.

BitmapInfo mask;

The image used as the mask.

WORD maskflag;

This is used internally. It indicates what part of the mask image is used to create the grayscale mask. It may be one of the following values: MASK_R, MASK_G, MASK_B, MASK_A, MASK_L, MASK_Z, MASK_MTL_ID, MASK_NODE_ID.

BitmapInfo imgQueue;

This is a BitmapInfo that holds information about the current Video Post main queue image buffer. This can be used to get Video Post's (or the target image's) resolution, etc.

FrameRange QueueRange;

This defines the entire Video Post Queue range. This is the range defined between VP Start Time and VP End Time in the video post user interface.

FrameRange ExecutionRange;

When the queue is executed, this is the range of frames being rendered.

FrameRange FilterRange;

The FilterRange is where this filter starts and ends.

Constructor & Destructor Documentation

◆ ImageFilterInfo()

◆ ~ImageFilterInfo()

Member Function Documentation

◆ SetName()

FLTExport void SetName ( const MCHAR n)

◆ SetResource()

FLTExport void SetResource ( const MCHAR n)
Remarks
Filters may want to identify themselves by something more specific than their names when they appear in the video post queue. By default, the name of a filter is used to identify it in the video post queue, ie the Negative filter appears as Negative. Some filters may want a more descriptive name to appear. For instance a gradient filter that allows the user to save named settings may want the name of the set to appear rather than simply the name of the filter itself. Thus, "Flowing gradient - Red to Blue" may appear rather than "Gradient". This method is available for filters that that give such names to parameter sets. If not empty, the resource name will be used to identify the filter in the Video Post Queue. This is saved along with everything else by the system (3ds Max).
Parameters:
const MCHAR *n

The name to appear, instead of the filter name, in the video post queue.

◆ Name()

FLTExport const MCHAR* Name ( )
inline
Remarks
Returns the name of the filter.
Operators:
241 { return (const MCHAR *)name;}
#define MCHAR
MBCS/Unicode helper defines std::wofstream doesn't mix well with Unicode.
Definition: strbasic.h:42

◆ Resource()

FLTExport const MCHAR* Resource ( )
inline
Remarks
Returns the resource name.
243 { return (const MCHAR *)resource;}

◆ GetPiData()

FLTExport void* GetPiData ( )
inline
247 { return pidata; }

◆ SetPiData()

FLTExport void SetPiData ( void ptr)
inline
248 { pidata = ptr; }

◆ GetPiDataSize()

FLTExport DWORD GetPiDataSize ( )
inline
249 { return pisize; }

◆ SetPiDataSize()

FLTExport void SetPiDataSize ( DWORD  s)
inline
250 { pisize = s; }

◆ ResetPiData()

FLTExport void ResetPiData ( )

◆ AllocPiData()

FLTExport BOOL AllocPiData ( DWORD  size)

◆ operator=()

FLTExport ImageFilterInfo& operator= ( ImageFilterInfo from)
Remarks
Assignment operator.
Parameters:
ImageFilterInfo &from

The source ImageFilterInfo.

◆ Save()

FLTExport IOResult Save ( ISave isave)

◆ Load()

FLTExport IOResult Load ( ILoad iload,
Interface max 
)

◆ Node()

FLTExport ITrackViewNode* Node ( )
inline
Remarks
This method is used to return the Track View node for this filter. Because Video Post Filter plug-ins have a short life, in other words, they are only loaded when they are actually needed and deleted right after, the Track View node information is kept in the ImageFilterInfo class kept by Video Post for each filter event.
306 { return node; }

◆ SetNode()

FLTExport void SetNode ( ITrackViewNode n)
inline
Remarks
This method sets the Track View node associated with this ImageFilter.
Parameters:
ITrackViewNode *n

The Track View node to set.
311 { node = n; }

◆ NodeID()

FLTExport Class_ID NodeID ( )
inline
Remarks
Returns the Class_ID of the Track View node (if any).
314 { return nodeid;}

◆ SetNodeID()

FLTExport void SetNodeID ( Class_ID  id)
inline
Remarks
Sets the stored Class_ID of the Track View node (if any).
Parameters:
Class_ID id

The id to set.
319 { nodeid = id; }

◆ UserLabel()

FLTExport const MCHAR* UserLabel ( )
inline
Remarks
Returns the optional label entered by the user while adding or editing a filter. This label replaces the filter's name in Video Post's tracks in Track View for easier identification. This is the name that is entered in the 'Edit Filter Event' dialog Filter Plug-In Label field. The label defaults to Unnamed in which case the Filter's name appears (for example 'Negative').
330 { return userlabel; }

◆ SetUserLabel()

FLTExport void SetUserLabel ( const MCHAR l)
inline
334 { userlabel = l; }

◆ FilterType()

FLTExport int FilterType ( )
inline
Remarks
This method is used so dual mode filters can detect what mode they are running in (as a filter or as a compositor). In the 3ds Max 1.x SDK, filters that ran both as filters and layers had no way to determine what mode they were running while in "Setup" mode (in ShowControl()). At run time they would check for a foreground bitmap. If it was NULL, they were to assume they were running as simple filters. Now this method may be used to determine what mode they are running in.
Returns
One of the following values:

FLT_FILTER

FLT_LAYER
351 { return flttype; }

◆ SetFilterType()

FLTExport void SetFilterType ( int  type)
inline
Remarks
This method is used internally.
353 { flttype = type; }

Member Data Documentation

◆ maskenabled

BOOL maskenabled

◆ evCopy

BOOL evCopy

◆ invertedmask

BOOL invertedmask

◆ mask

BitmapInfo mask

◆ maskflag

WORD maskflag

◆ imgQueue

BitmapInfo imgQueue

◆ QueueRange

FrameRange QueueRange

◆ ExecutionRange

FrameRange ExecutionRange

◆ FilterRange

FrameRange FilterRange