Weak references have been added in Max 8 to help increase speed in character and other rigs when node references need to be stored. This affects tools like script controllers that now store variables as well as custom attributes and scripted plugins that can store references to objects in param block 2.
In previous versions of Max objects could be stored in param block 2 as the type #node. This allowed for references of scene nodes to be stored as name independent objects so that renaming a rig wouldn't break it. The problem with storing the node is the referencing system would need to calls to the stored nodes even if it wasn't necessary. Using the new system of Weak Referencing the node isn't stored but instead a nodeTransformMonitor is stored that holds a reference to refTargMonitorRefMaker using a callback method. Using this system means dependency loop errors are avoided and objects can hold reference to each other without errors.
Here is a break down of a script that stores nodes as nodeTransformMonitor and then displays the node names in a listbox. Note that you can even store the node that the custom attribute is one in the param2 #maxObjectTab.
Down load full script: weakReferences.zip |