THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED
On 09/06/2008 at 06:17, xxxxxxxx wrote:
User Information:
Cinema 4D Version: 10.506
Platform: Windows ;
Language(s) : C++ ;
---------
Hi! I'm writing an exporter plugin and need information on how to extract camera animation. The camera is animated through its parent null object aligntospline tag.
As i was unable to find any documentation on how this animation system works I have tried numerous approaches to retrieving this animation data.
My first approach was using the Taligntospline tag;
(pseudo)
> \> ... \> for (LONG i=doc->getMinTime().Get()\*fps;i<doc->GetMaxTime().Get()\*fps;i++) { \> BaseTime time(i / fps); \> doc->AnimateObject(obj,time,0); tag->GetParameter(DescID(ALIGNTOSPLINETAG_POSITION),data,NULL); \> Vector pos = data.GetVector(); \> ... \>
That didnt give me anything useful (all data was 0) so I tried using CTracks etc. Iterating through the object hierarchy i I searched for CTracks;
> \> CTrack \*postrack_x = op->FindCTrack(DescID( DescLevel(ID_BASEOBJECT_POSITION,DTYPE_VECTOR,0),DescLevel(VECTOR_X, DTYPE_REAL,0)) ); \> CTrack \*postrack_y = op->FindCTrack(DescID( DescLevel(ID_BASEOBJECT_POSITION,DTYPE_VECTOR,0),DescLevel(VECTOR_Y, DTYPE_REAL,0)) ); \> CTrack \*postrack_z = op->FindCTrack(DescID( DescLevel(ID_BASEOBJECT_POSITION,DTYPE_VECTOR,0),DescLevel(VECTOR_Z, DTYPE_REAL,0)) ); \>
But that didnt give me anything but NULL (I also searched all tags).
Clearly i must be missing out on some fundamental concepts of this animation system. I assume the data is stored in a CTrack somewhere (??), but I cant figure out how to find'em (IDs??). And yes, I did call Polygonize(true). Also tried getFirstCTrack().
What I need is either a link to find some documentation on this issue or some pointers to guide me back on track:)
Thanks!
- bo