Writing Reference Makers
 
 
 

Most plug-ins are reference makers (i.e. derived from ReferenceMaker). If a plug-in makes wishes to observe an object it is responsible for implementing functions from ReferenceMaker for managing the reference links and to respond to reference messages from the objects it references.

A class derived from ReferenceMaker will usually manage its observed reference targets via member variables. These member variables should be initialized to NULL in its constructor.

The following are some methods of ReferenceMaker that must be implemented by a class that wishes to observe reference targets:

A reference maker is also responsible to call ReferenceTarget::NotifyDependents() whenever it changes in ways that it can affect reference makers that depend on it. It sends a reference message that encodes the nature of the change to the dependents of the reference target. This method is implemented by 3ds Max.

Note: In addition to ReferenceTarget and ReferenceMaker some functions accept the typedefs RefTargetHandle and RefMakerHandle:

typedef ReferenceTarget* RefTargetHandle;
tyepdef ReferenceMaker* RefMakerHandle;
See Also