How Plug-ins Observe Reference Targets
 
 
 

The primary use of the reference system for a plug-in is to allow it to observe 3ds Max entities derived from ReferenceTarget. To create references to a reference target a class must derive from ReferenceMaker, and override a number of functions. For more information see Writing Reference Makers.

In order for your plug-in to be informed of changes to a specific target, it must first create a reference to that target using the function ReferenceMaker::ReplaceReference(). For more information see Creating and Changing References.

Notifications of changes to a target are received by a plug-in through reference messages recieved in the function ReferenceMaker::NotifyRefChanged(). For more information see Reference Messages.

A reference maker can manage a fixed or variable number of references. The number of reference links managed by a reference maker is returned by the function ReferenceMaker::NumRefs(). The number of reference links is independent from the actual number of instances of reference targets. A reference link may be currently set to NULL as a target but the number of reference links is still considered to be fixed.