moving tracks spreaded on childobjects

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/07/2008 at 08:18, xxxxxxxx wrote:

User Information:
Cinema 4D Version:   10 
Platform:      
Language(s) :     C++  ;

---------
Hi!
If got a rather complex object, the root is a nullobject, follwed by a bunch of childobjects, which again can have childobjects a lot of them have animationtracks.
I want to move tese tracks to a startframe, but ofcourse without messing up the whole animation.

Is there an easy way to do this?
The root- (null)object doesnt have any tracks :-(

Or do I have to go through all objects (getdown, getnext), find the first key in the timeline (reference point in time, so the keydistances dont get messed up), then go through all objects/tracks again to move the keys?

Could GetCTrackRoot() help? What does it do?

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 15/07/2008 at 12:21, xxxxxxxx wrote:

As far as I know, yes, you'll have to through each object and get its tracks and move the keys. For getting the objects in a hierarchy, use a recursive function like this (first call with Null object in argument) :

//*---------------------------------------------------------------------------*
void ObjectRecurse(BaseObject* obj)
//*---------------------------------------------------------------------------*
{
     for (; obj != NULL; obj = obj->GetNext())
     {
          MoveKeys(obj);
          if (obj->GetDown())     ObjectRecurse(obj->GetDown());
     }
}

For each object, you can simply loop through all of its tracks:

CCurve* ccv;
for (CTrack* trk = obj->GetFirstCTrack(); trk != NULL; trk = trk->GetNext())
{
     // Go through keys on CCurve
     ccv =     trk->GetCurve();
     ...
}

THE POST BELOW IS MORE THAN 5 YEARS OLD. RELATED SUPPORT INFORMATION MIGHT BE OUTDATED OR DEPRECATED

On 16/07/2008 at 01:28, xxxxxxxx wrote:

Thanks Robert, saves me some work :-)