Extension to class Effect, new to 3ds max 8.
This class extends the Effect class through the addition of new methods.
All new Effect plugins should derive from the class. All existing Effect should ideally be re-compiled and derived from this class.
An Effect8* can easily be retrieved from an Effect& by calling: Effect8::GetEffect8(Effect& effect)
#include <sfx.h>
Public Member Functions |
|
virtual bool | SupportsBitmap (Bitmap &bitmap)=0 |
Returns wether the given bitmap is supported
by the effect. |
|
virtual CoreExport BaseInterface * | GetInterface (Interface_ID id) |
The InterfaceServer mechanism is used
to retrieve a Effect8* from a Effect*. |
|
virtual CoreExport void * | GetInterface (ULONG id) |
The compiler will hide this overload of
GetInterface() unless we define it here. |
|
Static Public Member Functions |
|
static CoreExport Effect8 * | GetEffect8 (Effect &effect) |
Converts an Effect& to an Effect8*, if possible.
|
|
static CoreExport bool | SupportsBitmap (Effect &effect, Bitmap &bitmap) |
Checks whether the given effect supports the
given bitmap. |
|
Static Public Attributes |
|
static
CoreExport const Interface_ID |
m_kEffect8_Interface_ID |
The interface ID of class Effect8, used in
combination with the InterfaceServer mechanism to
retrieve a Effect8* from a Effect*. |
Checks whether the given effect supports the given bitmap.
By default, all Effects which do not implement Effect8 only support 16bits-per-channel bitmaps with alpha (BMM_TRUE_64). The reason for this is that, prior to Max 8, this was the only type of bitmap ever used for render output. With Max 8, 32bit floating-point bitmaps may be created.
[in] | effect | - The effect which you want to test for compatibilty. |
[in] | bitmap | - The bitmap which you want to test for compatibility. |
virtual bool SupportsBitmap | ( | Bitmap & | bitmap | ) | [pure virtual] |
Returns wether the given bitmap is supported by the effect.
The implementation should usualy check the bitmap type (bitmap.Storage()->Type()) to determine whether it supports that type.
Usage example: An effect plugin which uses the BMM_Color_64 version of Bitmap::GetPixels() will work with 32bit floating-point bitmaps, but will clamp the colors and should therefore be considered incompatible. An effect plugin which uses the BMM_Color_fl version of Bitmap::GetPixels() can be considered as compatible with all bitmap types.
To check whether an effect supports a given bitmap, it is advised to call the static method Effect8::SupportsBitmap(Effect&, Bitmap&) instead of this. The static method handles class Effect as well as Effect8 and implements appropriate default behaviour for class Effect.
[in] | bitmap | - The bitmap to be tested for compatibility. |
Implemented in MSPluginEffect.
virtual CoreExport BaseInterface* GetInterface | ( | Interface_ID | id | ) | [virtual] |
The InterfaceServer mechanism is used to retrieve a Effect8* from a Effect*.
Reimplemented from BaseInterface.
Reimplemented in MSPluginSpecialFX< Effect8 >, and MSSpecialFXXtnd< Effect, MSPluginEffect >.
virtual CoreExport void* GetInterface | ( | ULONG | id | ) | [virtual] |
The compiler will hide this overload of GetInterface() unless we define it here.
Reimplemented from ReferenceTarget.
Reimplemented in MSPluginSpecialFX< Effect8 >, and MSSpecialFXXtnd< Effect, MSPluginEffect >.
CoreExport const Interface_ID m_kEffect8_Interface_ID
[static] |
The interface ID of class Effect8, used in combination with the InterfaceServer mechanism to retrieve a Effect8* from a Effect*.