Myel
02-28-2006, 09:40 AM
Hi!
I need to save some points arrays in my Plugin. Thus, I have used the CustomDataType functions and it works fine : these arrays are saved and loaded correctly. Now, I try to add Undo actions. But I can not use the function BaseContainer::AddUndo(LONG type, void *data) when data points to a element of a CustomDataType because Cinema4D crashes in that case.
Apparently, the reason is that I can use AddUndo() in this way : the data must be included in a container of the document.
Therefore, my question is :
How can I put a CustomDataType in a BaseContainer?
That is not clear in the documentation. Can anybody eventually have a little code?
Thanks in advance,
Myel
I need to save some points arrays in my Plugin. Thus, I have used the CustomDataType functions and it works fine : these arrays are saved and loaded correctly. Now, I try to add Undo actions. But I can not use the function BaseContainer::AddUndo(LONG type, void *data) when data points to a element of a CustomDataType because Cinema4D crashes in that case.
Apparently, the reason is that I can use AddUndo() in this way : the data must be included in a container of the document.
Therefore, my question is :
How can I put a CustomDataType in a BaseContainer?
That is not clear in the documentation. Can anybody eventually have a little code?
Thanks in advance,
Myel
