Main Index : Reference :

PluginSequence


Description

A plugin sequence class.

Definition

class PluginSequence : BaseSequence
{
public:
  PluginSequence();

  [int] GetID() = 0;
  
  [bool] Copy([PluginSequence] dest);
  [bool] Save([HyperFile] hf);
  [bool] Load([HyperFile] hf);

  [bool] Message([int] type, [VariableChanged,BaseContainer] data);
}

Explanation

A class to derive plugin sequences from.

Members

GetID()

[int] GetID() = 0;

Should return the id of the plugin. Must be overloaded in derived classes.


Copy( dest )

[bool] Copy([PluginSequence] dest);

This function must be overloaded if one wants to use custom variables in the derived sequence (i.e. not only the container). The function should copy any custom variables from this to dest and return TRUE. Otherwise the custom variables are lost when C4D wants to copy the sequence.

Save( hf )

[bool] Save([HyperFile] hf);

This function must be overloaded if one wants one's custom variables to be saved to disk. Use the HyperFile object that C4D sends to the function, hf, to save all of your variables and return TRUE.

Tips: It might be a good idea to use the first field in the HyperFile to save a version number for the plugin. Otherwise future versions of the plugin, with possibly different variables, won't know how to load the old sequence's data.

Load( hf )

[bool] Load([HyperFile] hf);

This function must be overloaded to load saved variables from disk. Load them from the HyperFile object in the same order as they were stored by Save() and return TRUE.


Message( type, data )

[bool] Message([int] type, [VariableChanged,BaseContainer] data);

Overload this function to be able to receive messages, like MSG_POINTS_CHANGED.