02-28-2006, 10:00 PM
You use SetData, then set it just as you do for any other customdatatype (read up on cinema's universal datatype GeData).
If you're making an object/scenehook etc you shouldn't have any problems with your custom datatype and undo's if you use the CopyTo function correctly, and then you dont' need to store it in the basecontainer.
Thanks for your reply.
In fact, in the Init function, I wrote the following code:
Bool MyTag::Init(GeListNode *node)
BaseContainer *data = tag->GetDataInstance();
GeData Ged = GeData(ID_MCD, M_Dt);
where ID_MCD is the ID for MyType (my CustomDataType), M_Dt is my data of type MyType.
Where do I need to write the same code? Each time I modify my data M_Dt? (by example in the function Message(GeListNode *node, LONG type, void *data) when I modify the contents of M_Dt according to the actions of the user?
I have two other questions:
- Is it enough to load and save my data? Previously, I used the functions CopyTo(NodeData* dest, GeListNode* snode , GeListNode* dnode, long flags, AliasTrans* trn), Read(GeListNode *node, HyperFile *hf, LONG level) and Write(GeListNode *node, HyperFile *hf) for this purpose.
- If I put my data in a basecontainer, how do I use the Undo, i.e. what must I put for data in the function AddUndo(LONG type, void* data), the basecontainer in which are stored my data?
Thanks again in advance,
03-02-2006, 07:05 PM
This thread has been automatically closed as it remained inactive for 12 months. If you wish to continue the discussion, please create a new thread in the appropriate forum.