Public Member Functions

MSEffectXtnd Class Reference

Search for all occurrences

#include <mxsPlugin.h>

Inheritance diagram for MSEffectXtnd:
Inheritance graph
[legend]

List of all members.

Public Member Functions

  MSEffectXtnd (MSPluginClass *pc, BOOL loading)
RefTargetHandle  Clone (RemapDir &remap)
  This method is used by 3ds Max to clone an object.
EffectParamDlg CreateParamDialog (IRendParams *imp)
DWORD  GBufferChannelsRequired (TimeValue t)
void  Apply (TimeValue t, Bitmap *bm, RenderGlobalContext *gc, CheckAbortCallback *cb)

Constructor & Destructor Documentation

MSEffectXtnd ( MSPluginClass *  pc,
BOOL  loading 
)

Member Function Documentation

RefTargetHandle Clone ( RemapDir remap ) [virtual]

This method is used by 3ds Max to clone an object.

See also:
CloneRefHierarchy(), class RemapDir This method is called by 3ds Max to have the plugin clone itself. The plug-in's implementation of this method should copy both the data structure and all the data residing in the data structure of this reference target. The plugin should clone all its references as well. Also, the plug-in's implementation of this method must call BaseClone(). In order for classes derived from this class to clone cleanly, the Clone method should just create the new instance, and then call an implementation of BaseClone that clones the references and copies any other necessary data. For example:
            class MyDerivedPlugin
                : public MyBasePlugin
            {
                const int MY_REFERENCE = 1;

                ReferenceTarget* Clone(RemapDir& remap)
                {
                    ReferenceTarget* result = new MyDerivedPlugin();
                    BaseClone(this, result, remap);
                    return result;
                }

                void BaseClone(ReferenceTarget* from, ReferenceTarget* to, RemapDir& remap)
                {
                    if (!to || !from || from == to)
                        return;    
                    MyBasePlugin::BaseClone(from, to, remap);
                    to->ReplaceReference(MY_REFERENCE, remap->CloneRef(from->GetReference(MY_REFERENCE)));
                }
            };

This method should not be directly called by plug-ins. Instead, either RemapDir::CloneRef() or CloneRefHierachy() should be used to perform cloning. These methods ensure that the mapping from the original object to the clone is added to the RemapDir used for cloning, which may be used during backpatch operations

Note:
See the remarks in method BaseClone() below.
Parameters:
remap - A RemapDir instance used for remapping references during a Clone.
Returns:
A pointer to the cloned item.

Reimplemented from MSPluginEffect.

EffectParamDlg* CreateParamDialog ( IRendParams ip ) [virtual]
Remarks:
This method creates and returns a new instance of a class derived from EffectParamDlg to manage the user interface. This put up a modal dialog that lets the user edit the plug-ins parameters.
Parameters:
IRendParams *ip

This is the interface given to the rendering effect so it may display its parameters.
Returns:
A new instance of a class derived from EffectParamDlg.

Note: typedef SFXParamDlg EffectParamDlg;
Default Implementation:
{return NULL;}

Reimplemented from MSPluginEffect.

DWORD GBufferChannelsRequired ( TimeValue  t ) [virtual]
Remarks:
Returns a DWORD that indicates the channels that this Effect requires in the output bitmap.
Parameters:
TimeValue t

The time at which the channels are required.
Returns:
The required channels. See Image (G-Buffer) Channels.
Default Implementation:
{ return 0; }

Reimplemented from MSPluginEffect.

void Apply ( TimeValue  t,
Bitmap bm,
RenderGlobalContext gc,
CheckAbortCallback cb 
) [virtual]
Remarks:
This is the method that is called to apply the effect to the bitmap passed.
Parameters:
TimeValue t

The time at which to apply the effect.

Bitmap *bm

The bitmap the effect modifies and stores the result in.

RenderGlobalContext *gc

This can be used to retireve information about the global rendering enviornment.

CheckAbortCallback *cb

Points to an object whose Check() method may be called to determine if the user wants to abort. See Class CheckAbortCallback.

Reimplemented from MSPluginEffect.


MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd
MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd MSEffectXtnd