Camera matrix during animation
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 26/08/2012 at 11:53, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 13
Platform: Windows ; Mac OSX ;
Language(s) : C++ ;---------
Hi,I'm trying to get the inverse camera matrix of the render basedraw for an animation export. I step through the animation keys of the active camera object:
doc->SetTime(bt); // Set Time to key->GetTime(); doc->ExecutePasses(NULL, TRUE, TRUE, TRUE, BUILDFLAGS_0); EventAdd(); // don't know whether that's required in this case BaseDraw *bd = doc->GetRenderBaseDraw(); Matrix m = bd->GetMi(); ...
The matrix won't change during animation. It keeps the values from the first frame! Do I have to send another kind of update message?
If I use the inverted global matrix of the camera object, it works, but I would prefer to use the matrix from the render basedraw.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/09/2012 at 13:29, xxxxxxxx wrote:
I dunno if this will help or not, but after the EventAdd(), add this:
DrawViews(DRAWFLAGS_FORCEFULLREDRAW | DRAWFLAGS_NO_THREAD, NULL); // force completion of cache rebuild
...I use that sequence of calls when I'm dealing with animating the document.
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 01/09/2012 at 13:32, xxxxxxxx wrote:
...more specifically, I have a 'version compatibility' routine that I call...
//------------------------------------------------------------- // cmpAnimateDocument() //------------------------------------------------------------- void cmpAnimateDocument(BaseDocument *pDoc, const BaseTime& frameTime) { // StopAllThreads(); pDoc->SetTime(frameTime); #ifdef _R12_SDK_ pDoc->ExecutePasses(NULL, TRUE, TRUE, TRUE, BUILDFLAGS_0); #elif _R11p5_SDK_ pDoc->ExecutePasses(NULL, TRUE, TRUE, TRUE); #else pDoc->AnimateDocument(NULL, TRUE, TRUE); #endif EventAdd(); #ifdef _R12_SDK_ DrawViews(DRAWFLAGS_FORCEFULLREDRAW | DRAWFLAGS_NO_THREAD, NULL); // force completion of cache rebuild #elif _R10p1_SDK_ DrawViews(DA_FORCEFULLREDRAW | DA_NO_THREAD, NULL); #else DrawViews(DA_FORCEFULLREDRAW); #endif }
-
THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 02/09/2012 at 13:41, xxxxxxxx wrote:
OK, thanks. I'll try it tomorrow. But I dont't want the editor windows being redrawed since it's called very often.