THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 12/06/2007 at 13:24, xxxxxxxx wrote:
Cinema 4D Version: 9.603
Platform: Windows ;
Language(s) : C++ ;
I have a plugin that loops through a specified amount of frames within the active document, uses the ModelingCommandData struct to run the Current State to Object command on the active object for each frame. As the plugin makes the document loop through all of the frames the viewport does not update. Now the AnimateDocument() function sounds like it should update all values when called, while the EventAdd() function will update the editor. I am calling both of these commands for each frame in my loop, but nothing updates until the loop ends. Any ideas on whats going wrong? Thanks in advance for any help.
One thing that I should mention is that I have also tried AnimateObject(), which seems to do the same thing.
Here is some sample code:
mcd.doc = doc
while(currentTime < rangeMaxTime)
currentTime = doc->GetTime();
doc->AnimateDocument(NULL, TRUE, TRUE);
mcd.op = doc->GetActiveObject();
if(!SendModelingCommand(MCOMMAND_CURRENTSTATETOOBJECT, mcd)) return TRUE;
//finish rest of commands
//Go to the next frame