THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 20/01/2012 at 13:53, xxxxxxxx wrote:
User Information:
Cinema 4D Version: R13
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;
---------
A GeDynamicArray of vectors is a member variable in my EffectorData class.
Most or all of the stored vectors are reset to their saved values each time an Undo action is peformed.
NodeData::CopyTo() is being called for each Undo and the array is being copied correctly to the cloned render document. Read() and Write() are implemented.
Bool GapEffector::CopyTo(NodeData *dest, GeListNode *snode, GeListNode *dnode, COPYFLAGS flags, AliasTrans *trn)
{
GapEffector* base = (GapEffector* )dest; if(!base) return FALSE;
base->datArr = datArr;
return TRUE;
}
The problem doesn't occur if the array is stored in a static or global variable. Another option is needed as I don't want separate plugin instances accessing the same array.
Any help would be much appreciated.