Bake animation in the background
-
I am doing something similar to the code shown in here by lasselauch - launched by a button in my dialog box. Since I am not super experienced with the c4d api, this might be a simple ask, but how would I go about running this code where the UI will update, or updating the scene so it does not feel like it locks everything up? Would I use the timer, or a thread, or c4d.EventAdd(), or something else?
Update 31/10/2024 (i_mazlov): Forked from https://developers.maxon.net/forum/topic/11667/access-bake-objects-timeline-or-bake-animation-to-curves/4
-
Hi @brian-michael,
I've forked your posting in a dedicated thread. For your following postings please stick to our guidelines, which you can find in the Support Procedures, namely:
Singular Subject: From all this follows that a topic must have a singular and sparse subject tied to a specific problem
especially when it comes to N-years-old threads
Regarding your question, please share more context on what specifically you're trying to do, because depending on that you can end up in a completely different ways of approaching your goal.
For example, if you'd like to bake animation in a "read-only manner" (just take the object transformations and store/send them somewhere), then the suggested approach would be to clone document and process it in a separate C4DThread. You can check Ferdinand's code example on the exact same topic in application to rendering document: RenderDocument/PythonCallBack : how to display progress prints during the render. However, with such approach you're limited to not being able to modify original document (because you'd use the cloned document instead of the active one).
Cheers,
Ilia