Public Member Functions | Public Attributes

ImageFilterInfo Class Reference

Search for all occurrences

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.

#include <filters.h>

Inheritance diagram for ImageFilterInfo:
Inheritance graph
[legend]

List of all members.

Public Member Functions

FLTExport  ImageFilterInfo ()
FLTExport  ~ImageFilterInfo ()
FLTExport void  SetName (const MCHAR *n)
FLTExport void  SetResource (const MCHAR *n)
FLTExport const MCHAR *  Name ()
FLTExport const MCHAR *  Resource ()
FLTExport void *  GetPiData ()
FLTExport void  SetPiData (void *ptr)
FLTExport DWORD  GetPiDataSize ()
FLTExport void  SetPiDataSize (DWORD s)
FLTExport void  ResetPiData ()
FLTExport BOOL  AllocPiData (DWORD size)
FLTExport ImageFilterInfo operator= (ImageFilterInfo &from)
FLTExport IOResult  Save (ISave *isave)
FLTExport IOResult  Load (ILoad *iload, Interface *max)
FLTExport ITrackViewNode Node ()
FLTExport void  SetNode (ITrackViewNode *n)
FLTExport Class_ID  NodeID ()
FLTExport void  SetNodeID (Class_ID id)
FLTExport MCHAR *  UserLabel ()
FLTExport void  SetUserLabel (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

Constructor & Destructor Documentation

FLTExport ImageFilterInfo ( )
FLTExport ~ImageFilterInfo ( )

Member Function Documentation

FLTExport void SetName ( const MCHAR *  n )
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.
FLTExport const MCHAR* Name ( ) [inline]
Remarks:
Returns the name of the filter.
Operators:
{ return    (const MCHAR *)name;}
FLTExport const MCHAR* Resource ( ) [inline]
Remarks:
Returns the resource name.
{ return    (const MCHAR *)resource;}
FLTExport void* GetPiData ( ) [inline]
{ return pidata; }
FLTExport void SetPiData ( void *  ptr ) [inline]
{ pidata = ptr; }
FLTExport DWORD GetPiDataSize ( ) [inline]
{ return    pisize; }
FLTExport void SetPiDataSize ( DWORD  s ) [inline]
{ pisize = s; }
FLTExport void ResetPiData ( )
FLTExport BOOL AllocPiData ( DWORD  size )
FLTExport ImageFilterInfo& operator= ( ImageFilterInfo from )
Remarks:
Assignment operator.
Parameters:
ImageFilterInfo &from

The source ImageFilterInfo.
FLTExport IOResult Save ( ISave isave )
FLTExport IOResult Load ( ILoad iload,
Interface max 
)
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.
{ return node; }
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.
{ node = n;      }
FLTExport Class_ID NodeID ( ) [inline]
Remarks:
Returns the Class_ID of the Track View node (if any).
{ return nodeid;}
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.
{ nodeid = id;  }
FLTExport 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').
{ return userlabel; }
FLTExport void SetUserLabel ( MCHAR *  l ) [inline]
{ userlabel = l; }
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
{ return flttype; }
FLTExport void SetFilterType ( int  type ) [inline]
Remarks:
This method is used internally.
{ flttype = type; }

Member Data Documentation

BOOL evCopy
WORD maskflag

ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo
ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo ImageFilterInfo