Solved Advice for storing animation in a Hyperfile

Hello,
Is there a recommended way for storing an object's animation in a Hyperfile?

My instincts would be to serialize everything (desc_ids, keyframes, value, spline types etc.) as ints, floats, & strings in the BaseContainer.

It would be more simple though if I could store the object's CTracks however I don't see a Data Type for them in BaseContainer and I haven't been able to get the BaseContainer's SetLink & GetLink to work with Hyperfile.

Advice before I dive into this would be very appreciated. Thank you very much!

CTrack inherits from C4DAtom which has the write() and read() member functions. So you should be able to write them directly to your hf.

Hi @blastframe , thanks for reaching out us.

With regard to your request, I think the most effective approach is to isolate the object by using c4d.documents.IsolateObjects() and then save the file using c4d.documents.SaveDocument().

With regard instead to the other discussion you've referred to, note that BaseLink has nothing to do on saving objects outside Cinema 4D, but rather on handling a reference to a C4DAtom eventually in the context of a specific BaseDocument.

Best, Riccardo