Extend object animation from another object

Hi all,

I would like some advice as I am trying to copy and extend the animation of an object from another object in which I am having trouble with.

I have a attached a simple scene - here, where there are 2 objects - ball01 and ball02.

  • ball01 has animation keyframe from 1-10 while,

  • ball02 has animation keyframe from 10-20, with frame 10 of each object at the same position.

I tried using parentConstraint which seems to work but that would ends up ball01 losing its initial animation from frame 1-10.

Any other ways that I can try out with?

Many thanks in advance for any advice!

Hi all, any takes on this?

Having you tried using the constraint as you mention, but simply turning its weight off for frames 1-10?

I tried using cmds.bakeResults to bake out the constraints channels (those highlighted in green), however while doing so, it is not setting the keyframe at all and the channels still remains green while it seems to have keyframe all my other non-constraint channels and also setting the value of the blendParent from 1 to 0.

Any ideas?

The channels remain green until you remove the constraint, but there should be baked keys.

As soon as I remove the constraint, the curves has a big difference/ jump between frames. Eg. Frame 10, X object has a translateZ value of 5, and at Frame 11, the value is 5.15 but once the constraint is removed, the translateZ at Frame 1039 is 105.
Basically what I am trying to say here is that, when the constraints are in effect, the animation looks right, but it all went bonkers as soon as I perform the baking and removing of constraints, in which I am still unable to figure out.

I think the command is not taking into account of the constrained value…

Additionally, does cmds.bakeResults bake other attributes too despite I have used the flag - attribute for specified attributes, in this case, translateXYZ and rotateXYZ…

I found the following mel command

global proc bakeAnimation()
{
	for ($bone in `ls -sl`)
	{
		bakeResults -t (`playbackOptions -q -min` + ":" + `playbackOptions -q -max`) -sm true -hi both -at t -at r $bone ;
	}
}

While the command took way way longer to bake each selection, it does keyframe and bake the animation correctly…
And as soon as I try to refactor it into python, it seems not to have work.